Questions tagged [multi-database]

120 questions
0
votes
0 answers

Rails sql includes table from another base and add where condition on it?

I have a specific database (called account_base) for my account : class Account < ActiveRecord::Base establish_connection :account_base ... end I have user from app rails database : class User < ActiveRecord::Base belongs_to…
Matrix
  • 3,458
  • 6
  • 40
  • 76
0
votes
1 answer

Multi-Tenancy , multi database Laravel management best practice

I am looking towards building a multi-tenant Laravel app which is a school management system that has one code-base but has multiple databases for each school. This system will have 800 schools (tenants), and each school will have its own users…
Lusit
  • 21
  • 4
0
votes
1 answer

Asp.net 5 Handling multi-databases structure

I'm trying to implement multi-database structure with automatic migrations. databases uncountable and i can't set the a fixed connection strings. i tried many ways to handle it, some ways worked but could not handle automatic migrations. I have two…
0
votes
2 answers

Rails NoMethodError (undefined method `<<' for #):

The Back Story I am currently changing my Ruby on Rails app to a multi-database configuration. Main reason for the switch was to put my Member(User) and Profile tables in a separate database, which could be accessed from another RoR app; thus…
0
votes
0 answers

apply a procedure to rows of a dataframe by using another dataframe data in pandas

I have two dataframes, let's say dfr1 and dfr2. dfr1 looks like: x,y,z 1,2,3 1,1,3 1,2,3 1,4,3 1,5,3 while dfr2 looks like: p1,p2,p3 100,200,300 100,400,300 100,500,300 I would like to apply a procedure to each row of dfr1 by…
diedro
  • 511
  • 1
  • 3
  • 15
0
votes
0 answers

Error when getting all model names in django app

I am using different dbs inside my django application and while db routing, i am trying to get all models using all_models = dict([(name.lower(), cls) for name, cls in app.models.__dict__.items() \ if isinstance(cls, type)]) While running…
User123
  • 793
  • 4
  • 10
  • 28
0
votes
2 answers

Laravel multiple database connection dynamically after login

Recently I'm working on a laravel which is a shop management system, where every shop will have its own database. User have access database connection access from session after login. But I can't establish this system by own.
0
votes
1 answer

How to config applicatiuon.yml when using Micronaut + GORM with multiple data sources

Environmant: Java 11 + Micronaut 2.1 + GORM. I have two databases to connect. PostgreSQL and MSSQL. I have tried some ways looked up in Internet but all failed. Below is my detail configuration, code, and output log. Please instruct me how to…
wureka
  • 731
  • 1
  • 11
  • 26
0
votes
1 answer

What is the proper way to indicate which data source to inject into my DAOs in a multi-module multi-datasource project?

I have a project split into 3 modules (so far) - core (Model 1), user-management (model 2) and web (View and Controller). My project structure (simplified to only relevant classes for the sake of getting to the point) is as follows: Project |--…
roman
  • 151
  • 1
  • 9
0
votes
1 answer

Save using multiple databases

I am using multiple databases DATABASES = { 'default': { # for local postgre databases 'ENGINE': 'django.db.backends.postgresql', 'NAME': '2003', 'USER' : 'postgres', 'PASSWORD' : '3211', 'HOST' :…
0
votes
1 answer

is there a way to create database from django manage command?

is there a way to create database from django manage command ? i want create a multitenant Application and need to generate dynamic database configuration for django manage command. DATABASES = { 'default': { 'ENGINE':…
ehsan safir
  • 43
  • 1
  • 3
0
votes
2 answers

Problem to recover data from several databases in Symfony 5

I create two connections for two databases as the Symfony recommends: https://symfony.com/doc/current/doctrine/multiple_entity_managers.html I use Symfony 5.0. I configure two entity managers: # config/packages/doctrine.yaml doctrine: dbal: …
Seb
  • 11
  • 3
0
votes
1 answer

SpringBoot, test containers to test queries sent to external DB

My Spring app has its own DB for persistence. The same app needs to send ad-hoc queries to external databases. Queries are provided by users. App takes SQL query provided by user App takes external database type (postgres / oracle / whatever…
0
votes
1 answer

SQL Server 2008 Multi-db stored procedure: The multi-part identifier could not be bound

I am trying to write a stored procedure for SQL Server 2008. It is for a migration tool that migrates data from one database to another. I want to get all records from the old database that aren't yet present in the new database. For that end I use…
Bernhard
  • 1,455
  • 5
  • 19
  • 24
0
votes
1 answer

Dealing with multiple databases in Django with and without timezones

I'm in the situation where I use django (2.0.7) to deal with multiples databases: database_A: without timezone; database_B: with timezone 'Europe/Paris'; settings.py USE_TZ = True TIME_ZONE = 'Europe/Paris' DATABASES = { 'database_A': { …
user2652620
  • 464
  • 2
  • 17