Questions tagged [schema-migration]

Schema migration refers to altering the data schema used in an application. This may merely involve changing the database, but frequently also involves code alterations.

Schema migration refers to altering the data schema used in an application. This may merely involve changing the database, but frequently also involves code alterations.

Because the data schema is often relatively stable, and code usually embeds assumptions about it, schema-migration must be handled carefully.

64 questions
1
vote
1 answer

flyway, added additional JDBC driver, still getting "No database found to handle"

The driver in question is jt400.jar; I copied it to the driver directory of my flyway installation. This is the content of the file flyway.config in my project…
AgostinoX
  • 7,477
  • 20
  • 77
  • 137
1
vote
0 answers

Flyway Java based migration on multiple shards

Followed this blog for creating simple java based migrations in flyway with one datasource connection. But in application, we will be having multiple shards and have feasibility to choose migration to run on one particular shard or all shards. But…
1
vote
1 answer

Schema migrations using peewee to create new models

I really like how lightweight and simple peewee is for ORM. But now I am trying to implement schema migtations in the database and I feel peewee might be a bit limited on this aspect. From what I understand in the documentation, peewee migrations…
Ji Zhang
  • 23
  • 4
1
vote
0 answers

How do I copy data from one table to another, perform schema change and keep them in sync until cut off in Postgres?

I have workloads that have heavy schema changes and other ETL operations that are locking. Before doing schema changes on my primary table, I would like to first copy the existing contents from the primary table on to a temporary table, then perform…
johncssjs
  • 61
  • 7
1
vote
1 answer

Asp.net core mvc migration database

When I add a column at Database, how to renew my DB.Context. it is my Context.cs modelBuilder.Entity(entity => { entity.ToTable("SensorModbusRTUSetting"); entity.Property(e =>…
GG6565
  • 138
  • 10
1
vote
1 answer

Modifying a refcursor from ORACLE TO PG getting error ?

FUNCTION default_refcursor RETURN SYS_REFCURSOR AS v_refcursor SYS_REFCURSOR; BEGIN OPEN v_refcursor FOR SELECT * FROM DUAL WHERE 1 = 2; RETURN v_refcursor; END default_refcursor; the above is cursor from oracle which I have to…
1
vote
2 answers

The most correct way to run MyBatis migration from a Docker container

I'm trying to figure out how and when to run the mybatis schema migrations from a Docker container deployed inside a Docker Swarm. I mean: I need the most correct way to do that. At the moment We build a Docker container from a Dockerfile FROM…
HK15
  • 737
  • 1
  • 14
  • 32
1
vote
1 answer

Ghost/copy table is many times bigger than original table

Info: I am using AWS RDS Mysql 5.6.34 (500GB) instance (Without replica, just the master) Note: Binlog is enabled & set to Row Target: Modify a column field_1 from enum to tinyint Extra info: I am using Rails application. So everytime I wanted to…
1
vote
1 answer

Manage Sqitch migrations when deploying different branches

When we deploy to our Testing environment with Sqitch, the migrations run and all is well. However, when we have to test a different code branch, the Sqitch migrations aren't rolled back. What I'm looking for is an idea of how others are solving…
1
vote
1 answer

When I run a schema migration before a data migration, with ActiveRecord, data does not properly update in DB

As of now, I have a users table with columns id, name, email, status status field is an integer type with values 1 and 2 representing an Active and Inactive user, respectively. I would like to change the status field to a string type and migrate…
1
vote
3 answers

SSDT Equivalent for Oracle Database

In SSDT there is a mechanism for managing DDL changes, for instance a new column or a change to a data type. Instead of putting an 'Alter Table' statement into the database project, instead we edit that original 'Create Table' statement which…
Satish Pahuja
  • 209
  • 1
  • 6
  • 20
1
vote
0 answers

mongoengine: change document subclass

I want to migrate an old mongoengine schema to a new one. Currently, the schema looks like this: class Main(Document): field_m = StringField() class MainSub(Main): field_ms = StringField() class A(MainSub): field_a = StringField() class…
sylar_5
  • 23
  • 1
  • 6
1
vote
1 answer

Django move table to other app using db_table and don't delete original table

I have moved my table from app_a to other app_b using db_table. I initially added meta information as, # app_b.models.ppy class Table(models.Model) # all fields class Meta: db_table = 'app_a_table' app_label = 'app_a' If I make any changes…
Netro
  • 7,119
  • 6
  • 40
  • 58
1
vote
1 answer

Postgres Full Text Search field addition with Django migration

I have followed this tutorial and added the PostgreSQL FTS capability to one of the tables of my Django (I'm using 1.8.1) project. Basically, I have an extra fts_document field in my table my_table of the my_app app. I'd like to keep the databases…
gevra
  • 737
  • 2
  • 14
  • 26
1
vote
1 answer

Database migrations with Qt4 (schema changes)

From Ruby on Rails I've learned about a comfortable and very manageable way to do database migrations. How would one handle such cases in Qt4? It does not need to be that elaborated as Rails' solution. I'd be fine with running SQL and code snippets…