database-migration

Liquibase does not generate consistent data difference of two databases

青春壹個敷衍的年華 提交于 2019-12-07 08:24:01
问题 I'm trying to generate migration with diffChangeLog. And it looks like Liquibase detects data changes only when table schema was modified. In other words if you have two DBs with same table, and you will insert or update rows in this table, Liquibase do nothing on diffChangeLog event with --diffTypes="data" parameter. But if toy create new table and insert rows in this table Liquibase generate inserts perfectly. Here are steps that I have made during my research: 1) Run two DBs: >sudo docker

Complete db schema transformation - how to test rewritten queries?

怎甘沉沦 提交于 2019-12-07 07:49:24
问题 Our database is poorly designed all the way around (we inherited it). I've reworked the schema to something useable and maintainable. Quite a few tables and columns have been dropped, many columns have moved and most tables and columns have been renamed. Some datatypes have been changed also. I've extracted all the queries from our webapps and we've started rewriting them. Our DBA is able to migrate the old data to the new schema, we think. To be sure we need to test each query by comparing

How to migrate the database from Filemaker to Mysql?

六月ゝ 毕业季﹏ 提交于 2019-12-07 05:25:34
问题 I am rebuilding an ERP system based on Symfony1.4 and MySQL 5.1. The challenge is that previous system was built on Filemaker Pro and I have to migrate all previous data to current system. For that, first I need to move all the data to a MySQL DB having the previous schema structure intact and then I can map the data to the current system schema by writing a script as needed. How should I proceed with that first step? Is there any existing tools or processes to do that? Any help will be

Roughly how fast is JSON -> JSONB column conversion in Postgres 9.4

混江龙づ霸主 提交于 2019-12-07 00:24:46
问题 I'm looking to migrate from Postgres 9.3 to 9.4, and have a lot of data in JSON columns. While it's fine, I wanted to have a look at migrating to the more efficient column storage (which JSONB seems to be — a really exciting piece of tech!). To actually migrate, I want to know migration characteristics for something like ALTER TABLE table_with_json ALTER COLUMN my_json SET DATA TYPE jsonb USING my_json::jsonb; (from this helpful question). Ideally, it would be good to know how long it takes

EF6 - Run Update-Database Command without seeds

一世执手 提交于 2019-12-06 21:02:36
问题 I'm Using Entity Framework 6 and I'm using migrations. I have already created the database using an initial migration. Now I have done changes to the Model and the context has changed, and I want to update the database BUT... When I try to run again the Database-Update command the seeds are also running too, and this bring errores due some data is inserted again. So, how can I to run the Update-Database command WITHOUT running the seed method? It is hard to believe that EF doesn't have any

How to use flyway to migrate data from one DB to another DB?

强颜欢笑 提交于 2019-12-06 15:06:10
I have two postgreSql DB on different server lets say A and B. Can I use flyway some how to copy all data from DB A to B which is newly setup and empty. Its will be helpful if anyone point me to correct direction and tool, requirement is to copy data from one DB to another through some tool automation huge data volume need to consider in solution. Flyway doesn't directly support such a capability. However, you could do the following: As Laurenz says, use pg_dump to extract DB A into a script file Create a Flyway migration script and copy in the contents of the script file Run the Migrate

Migrate RDBMS to Cassandra

北战南征 提交于 2019-12-06 14:53:37
I have a RDBMS database with the following tables: Airport ( iata PK , airport, city, state, country, lat, long) cancellation_cause ( cod_cancellation PK , description) Manufaturer (id_manufacturer PK , manufacturer_name) Model (id_model PK , model_name, id_manufacturer FK ) Airline ( airline_code PK , description) airplane_type (id_AirplaneType PK , airplane_type) engine_type (id_engine PK , engine_type) Aircraft_type (id_aircraft PK , aircraft_type) Airplane (TailNumber PK , id_model FK, id_aircraft FK , airline_code FK , id_AirplaneType FK , id_engine FK, Issue_date, status, year) Flight

How to drop and recreate all tables on DB version update in ActiveAndroid?

独自空忆成欢 提交于 2019-12-06 14:31:21
I'm using ActiveAndroid in my application as the Database system. At current stage I don't want to write the migration files for migrating current tables to altered ones for when I update DB version. Instead what I want to do is to drop all tables and recreate a new set of tables. Unfortunately from digging in the ActiveAndroid the Database version test happens at initialization stage in which I pass a ActiveAndroid Configuration object to configure the Database . At this point their implementation only checks for migration files in the assets folder. I don't mind to create migrations file to

Grails database-migration with property to be db agnostic

会有一股神秘感。 提交于 2019-12-06 09:53:31
Is there a way in the Grails-database migration plugin to define properties in migration files to be able to define database agnostic migration, like it is possible in Liquibase? I tried with: databaseChangeLog = { property([name:"boolean.type", value:"bit(1)",dbms:"mysql" ]) property([name:"boolean.type", value:"number(1,0)", dbms:"oracle"]) ... } an using it in the colum definition: changeSet(author: "me", id: "121112341-1") { createTable(tableName: "test_table") { ... column(name: "my_column", type: "${boolean.type}") ... } } but that does not work... In a Groovy file "${boolean.type}" is a

How can I version control Stored Procedures while using flywaydb?

♀尐吖头ヾ 提交于 2019-12-06 08:54:26
I currently have a Java web app which uses a Microsoft SQL Server back end. Database migrations are currently being done manually by sqlcmd which makes use of the :r command to reference script files of our stored procedures and views. This way each stored procedure has his own file "proc_someprocedure.sql" The migration is done by an upgrade script "6.1 upgrade.sql" which refrences the proc file to drop and recreate it in it's current version. We're looking to migrate to flyway and have the application migrate it's own database upon deployment. However, I can't find any easy way to maintain a