database-migration

How can we merge two databases with identical schemas?

孤者浪人 提交于 2019-12-23 15:32:58
问题 We have two instances of a rails application which each talk to their own database; we're in the process of converting them to a single application with a single database. We've already made the parts of it which need to be specific to a particular domain work correctly; now we just need to merge the databases. We're going to copy the data from one instance into the other's database, and fix up the IDs so they don't overlap. There are a lot of tables with a lot of foreign keys. What's a good

Database applies ALL previous migrations on update and NOT just the new one

烂漫一生 提交于 2019-12-23 09:47:01
问题 I'm developing a website which, as of current, both has a production and a test database. The production database is hosted externally while the test database is hosted locally. Whenever I make changes to my database I apply the changes through a migration. After having added a new migration I run the update-database command on both my production and test database to keep them in sync. I applied the migration just fine to my production database, however, when I wanna apply the migration to my

Database applies ALL previous migrations on update and NOT just the new one

安稳与你 提交于 2019-12-23 09:46:25
问题 I'm developing a website which, as of current, both has a production and a test database. The production database is hosted externally while the test database is hosted locally. Whenever I make changes to my database I apply the changes through a migration. After having added a new migration I run the update-database command on both my production and test database to keep them in sync. I applied the migration just fine to my production database, however, when I wanna apply the migration to my

Rails Error: Unable to access log file. Please ensure that /home…/log/development.log exists and is chmod 0666

时光怂恿深爱的人放手 提交于 2019-12-23 09:38:20
问题 Im trying to migrate a db2 database to Ruby on Rails, but just when I run rails g scaffold , I get this: Rails Error: Unable to access log file. Please ensure that /home/.../log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed. I have checked and my development.log does not exist! I'm not sure why, since I followed every step during the installation, but still my file doesn't exist. How can I create it

Cosmos DB - Bulk Import (single partition collections) with customized partition key

一个人想着一个人 提交于 2019-12-23 04:39:04
问题 I am trying to migrate some data from a JSON file to Cosmos DB using Data Migration Tool , when I tried to define the partition key with either single or a combination of my column name, every time I am getting undefined partition key after migration, how could I correct this issue? Note here I'll have to use Bulk import (single partition collections) options, because I need to execute my customized stored procedure for nested array import, I cannot use sequential record import as I know the

Entity Framework on different database

浪子不回头ぞ 提交于 2019-12-23 04:31:10
问题 I have a project which uses entity framework. We map a mssql db with entity framework. Now we want to change mssql db to oracle db. But I don't want to change my model of db in entity framework. Two dbs are same tables columns etc. only difference is their technologies(mssql and oracle) and some of the column data types.In mssql we use bigint instead of number in oracle. Is it possible to use same model with difference dbs which have same tables on Entity framework? 回答1: The provider model

Migrate RDBMS to Cassandra

断了今生、忘了曾经 提交于 2019-12-23 02:36:45
问题 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

Grails database-migration with property to be db agnostic

拈花ヽ惹草 提交于 2019-12-22 12:08:14
问题 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

Grails database-migration with property to be db agnostic

早过忘川 提交于 2019-12-22 12:08:07
问题 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

Usefulness of db migrations rollback

牧云@^-^@ 提交于 2019-12-22 10:31:13
问题 Many people talking about db migrations, especially about its rollback possibility. I doubt, whether it is useful at all, because schema of db and model are tightly connected with application logic (MVC). Suppose i've done rollback of some migration. And what ? The application will not work, because its logic fully relies on db. What are the use cases of rollback ability for db migrations ? Update 1 The main question Why the rollback is presented as a feature, when i need to change the code ?