Questions tagged [multi-database]

120 questions
0
votes
0 answers

NestJS TypeError: this.subQuery is not a function

I am facing this problem when I implemented a new module in my Nestjs API: TypeError: this.subQuery is not a function My project uses two databases each of them has its own entities and schemes as you see in the app.module.ts: import { Module }…
MONSEF OT
  • 13
  • 3
0
votes
1 answer

Finding not migrated databases (can be found in one table) in one SQL Server

I have more than 100 databases (all have the same schema [dbo.]) on the same SQL Server. After upgrading program which is using these databases, we discovered few databases are not "upgraded" with our script. Now I have to find all not upgraded…
NewOne
  • 1
  • 1
0
votes
0 answers

Django tests create with PostgresQL multi schema

I would like to test a create view with django TransactionTestCase. Here is my settings.py: DATABASES = { 'default': { "ENGINE": PG_ENGINE, 'OPTIONS':{'options': '-c search_path=schema1,schema2,public', 'isolation_level':…
Joanna
  • 81
  • 1
  • 6
0
votes
0 answers

Laravel multi db tenancy with login using main users table

I want to do multi db multi tenancy for a saas type shop app so that users is in main db, and users login using this table, and all shops have different db and users_table have shops db id, and all the shops regarded model uses tenant connection. I…
0
votes
2 answers

Multi-database in django: Tables not dumped

I'm trying to demonstrate the use of multi-database in Django using db routers but facing issues dumping data into respective databases. The django models are visible in both databases, but not my own created ones. Here is my models.py file: from…
0
votes
0 answers

Primary-replica architecture for Django testing: non deterministic synchronization issue

I'm using a primary-replica architecture for Django testing. The implementation is pretty straight-forward, as seen here. The thing is that some tests are passing non deterministically: for example, they fail when I run that specifiy…
0
votes
0 answers

ModelSerializer foreign key relation issue in multi database DRF project

In my DRF project, I use multiple databases to handle the data I don't specify a default database in settings. whenever I use the model serializer with ForeignKey relation Django emits the following error settings.DATABASES is improperly configured.…
0
votes
1 answer

Django Project Multi-Database Config in settings.py

I am currently in the process of taking an asp.NET internal website written in C# and redoing it in the Django web framework. After identifying all of the current data sources being used by the .NET site, I have begun configuring and testing my…
Jared
  • 3
  • 1
0
votes
1 answer

Is that possible to initialize all the tenants DB at once and take all the records in a table? Laravel Multi tenant

As my diagram, I want to get all the records of table 1 in every tenants from the central domain side. Is that possible to initialize all the tenants at once and take all the records? Or should I initialize tenants one by one and push records to an…
0
votes
0 answers

Multi-datasource Java SpringBoot app takes more than 3 sec for writing a single record. how can I improve the write performance?

I have created a SpringBoot app that connects to two databases (using separate JPA config) for data read and write operations. Data is manipulated and partially persisted in two databases (DB servers are in two separate infrastructures). Similarly,…
Shihad Salam
  • 79
  • 2
  • 11
0
votes
1 answer

How to connect multi-database in multi-tenant in Laravel tenancyforlaravel

I am learning how to develop a laravel multi-tenant, multi-database & multi-domain web application. So I am using the tenancyforlaravel (archtechx/tenancy) package (the very first time I am using it). So my problem is how to connect the new database…
0
votes
0 answers

Django test with multiple databases without a default connection

I've created a cut down scenario from scratch to hopefully find a solution to what I have witnessed in some production code - which has stopped me dead in my tracks. The code is here: https://github.com/andez2000/issue-django-multi-db The problem is…
Andez
  • 5,588
  • 20
  • 75
  • 116
0
votes
1 answer

How to share a single sequence between multiple SQL Server databases?

I need to share a single SQL Server sequence between tables in two different SQL Server databases. This example works just fine for two existing tables and a sequence defined on the same database: USE DatabaseA ; GO CREATE SEQUENCE…
kermit
  • 1
  • 1
0
votes
2 answers

Spring boot application problems with multiple databases

I am trying to have a OneToMany and ManyToOne mapping in my persistence classes. I have following tables: @Data @AllArgsConstructor @NoArgsConstructor @Entity @Table(name = "file") public class File { @Id @GeneratedValue(strategy = AUTO) …
harbk
  • 37
  • 8
0
votes
1 answer

django settings.py and multi-database help

I'm using django1.3, wanted to put my data into 1000 databases, like app_idmod_0 ~ ap_idmod_999. Now I changed my settings. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql',…
user877783
  • 53
  • 4