Skip to main content

Questions tagged [schema-migration]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Is this a good definition of schema migration?

I'm trying to preserve the meaning of the English word 'migration' in the definition, and I think I might be able to do that without making up a fake definition. Here goes: A schema migration is the ...
Joel's user avatar
  • 1
0 votes
0 answers
21 views

Loops not allowed on MongoDB Relational Migrator

Hi I'm trying to use MongoDB Relational Migrator to migrate my postgreSQL DB to MongoDB but I'm getting this message when I try to create a data migration job Error building job context: loops not ...
user2782149's user avatar
0 votes
0 answers
31 views

How to migrate a web app from a monolithic to a backend-frontend architecture while keeping both running side-by-side? (PHP, MySQL)

I have been maintaining for quite some time a monolithic web app written in vanilla PHP, SQL, CSS, and JS (no frameworks used; no external APIs used; in simple terms, it's just PHP code querying a ...
kataba's user avatar
  • 33
5 votes
2 answers
323 views

Can I change the owner of the cdc schema?

I've enabled Change Data Capture (CDC) on a database using exec sys.sp_cdc_enable_db This creates a new cdc schema which is owned by the cdc user select s.* , dp.name from sys.schemas as s ...
Zikato's user avatar
  • 5,062
0 votes
1 answer
767 views

The SELECT permission was denied on the object '__EFMigrationsHistory', database 'master', schema 'dbo'

I'm trying to create asp.net core web api. (https://youtu.be/EmV_IBYIlyo?si=GcPVN7BuautDy6-j&t=1351) At the point where he executes Add-Migration InitialCreate and Update-database my console ...
Lukas Čaplikas's user avatar
0 votes
0 answers
694 views

DBeaver database export not exporting foreign keys

I have DBeaver 23.1.0 on Windows. I want to export tables (PostgreSQL) from Database A to Database B, including foreign keys. What I found out was to mark all tables from Database A -> Right click -...
fabpico's user avatar
  • 111
1 vote
1 answer
237 views

T-SQL schema changes that can be performed in O(1)

We want to minimize the downtime for our users during the upgrade process and want to ensure that our schema changes can all be performed in O(1) and are not O(n). Is there a list of documented schema ...
D.R.'s user avatar
  • 343
1 vote
1 answer
240 views

Migrate MyISAM tables to InnoDB using replication to avoid a long down time

We have to migrate MyISAM tables to InnoDB but we are afread of a long down time. In our database we have 10 MyISAM tables where 2 of them are the biggest: ~26GB data + ~10GB indexes. My question is: ...
Ela's user avatar
  • 500
5 votes
3 answers
2k views

Migrating existing tables to use INT primary key instead of UUID mysql v8

I'd love to hear everyone's opinion on this issue. I currently use Innodb mysql v8 in RDS. Our db is moderate, with ~130 tables, most are small, with our largest table having ~30 million rows over 6 ...
Muab Nhoj's user avatar
  • 411
0 votes
0 answers
90 views

Horizontal scaling with database schema

I am designing a database schema for our customers on-premise, which will be moved to Azure PaaS later. Regarding the "scale out" strategies I lean towards to create "one database",...
Avi's user avatar
  • 265
2 votes
1 answer
1k views

Adding data to a DB as migrations

Some Background We currently have a PostgreSQL DB that is "read-only", i.e. no user is allowed to write to it and all insertions are done in a controlled manner. For a while, these were done ...
fditz's user avatar
  • 121
0 votes
2 answers
835 views

Error when migrating MySQL 8 to SQL Server 2019

I get an error while migrating a database from MySQL 8.0 to SQL Server 2019 using the SQL Server Migration Assistant. The error message: ExecuteReader requires an open and available Connection. The ...
Carlos Vaz's user avatar
0 votes
1 answer
1k views

Achieving best practice schema and permissions management on PostgreSQL

I have a PostgreSQL database (12, moving to 13 imminently) with a single (Rails) application running on it, and no other users or systems connecting. The application uses the postgres user to connect ...
David Aldridge's user avatar
0 votes
1 answer
82 views

Table design comment_seen vs comment_unseen — migrate data from one to another

I have system that allows comments posted by users and tracks which users seen which comments. The read/unread state is tracked within comments_seen table. Surely enough, it grow tremendously. My goal ...
Eduard Sukharev's user avatar
2 votes
3 answers
715 views

Is it good practice to refer to a table with different names in a database schema? [closed]

We have a database currently running with a table named a certain way (let's say thing for the sake of example), and references to that table named the same way (FK would be named thing_id for ...
Aweb's user avatar
  • 21
1 vote
1 answer
904 views

Error: Not run migration 1604169742656_add-users-table is preceding already run migration 1604024614269_table-comments

I was trying to run a migration file to create a table of users but I kept getting the following error: Error: Not run migration 1604169742656_add-users-table is preceding already run migration ...
Daniel's user avatar
  • 281
0 votes
1 answer
111 views

Deploying Oracle ADW Changes from development environment to production

I'm currently running an Oracle Autonomous Data Warehouse (Oracle's cloud-based database offering) on version 19c. I have a development database on the Always Free Tier and my production database is a ...
Ash Oldershaw's user avatar
0 votes
1 answer
5k views

MariaDB Replication - Replicate only specific tables and views

Note: A backend developer here with little to no experience in setting up database servers and replication. What needs to be done Setup DB replication of an existing database with the following ...
qwertynik's user avatar
0 votes
1 answer
335 views

Data migration: copy data with insert select and fill unique column

I have some tables in Postgres like this. create table foo ( txt text ); insert into foo (txt) values ('a'); insert into foo (txt) values ('b'); insert into foo (txt) values ('c'); create table ...
425nesp's user avatar
  • 171
0 votes
2 answers
623 views

What's the best way to migrate a database to a server of a lower SQL version?

I have Database A on SQL Server 1 that is SQL Server version 2016. I need to migrate it to Server 2 that is SQL Server version 2012. Database A is pretty small, only about 5 GB total. I don't think ...
J.D.'s user avatar
  • 38.1k
0 votes
1 answer
426 views

How to perform schema migration from array to many-to-many to lookup table?

I currently am storing values in a column of type array like follows (this is just an example): CREATE TABLE blog_posts( id INTEGER PRIMARY KEY, blog_title TEXT, tags TEXT[] ); With the ...
ben_frankly's user avatar
17 votes
2 answers
5k views

Best practices for keeping protobuf spec in sync with relational database (e.g. PostgreSQL)

1. We have a schema definition in Google's Protocol Buffers format that we use to generate code for different gRPC implementations (Python, PHP) 2. We have a database (PostreSQL) that is initialized ...
Alex's user avatar
  • 413
0 votes
1 answer
185 views

Migrate legacy application to new db/schema

I apologize if I made any mistake/missing info, fist post here! I am in the process of rewriting a website from scratch to a newer tech stack with a completely redesigned architecture. The website in ...
ruben1691's user avatar
  • 101
0 votes
1 answer
84 views

Restructuring table - start with PK or not?

I am restructuring a bunch of tables in my database (in this case using a smaller data type for some columns - in most cases cutting those by ~50%, and they tend to be large columns). I've gone ...
Oded's user avatar
  • 334
0 votes
1 answer
278 views

How to speed up Oracle to PostgreSQL data transfer

I have an Oracle schema that I am transferring to PostgreSQL with ogr2ogr. This particular table has 5 columns with number(22) each. There are some 300M rows. In under 10 minutes I can transfer this ...
Stepan's user avatar
  • 213
2 votes
0 answers
1k views

Received an unsupported type from Postgres. (14) (SQLGetData)

I have database in PostgreSQL. It is simplest possible database with schema presented here: http://www.postgresqltutorial.com/postgresql-create-table/ I want to migrate it to MySQL. I trying to ...
Daniel's user avatar
  • 209