Questions tagged [database-migration]

database-migration is the process of transferring data between storage types, formats, or computer systems. Also refers to migrating the database from one vendor to another, or to upgrading the version of the database software.

0
votes
0answers
11 views

How do you map abstracted relationships with a core data mapping model?

In my v1 core data model, I had: Discussion relation: Image (to-one) Image relation: Discussion (to-one) In v2 model, I now have: FileObject (abstract) FileMediaObject: parent FileObject (...
-1
votes
1answer
30 views

Can't migrate column renaming in room database

I was trying to run migration while renaming a column in room database. My code is following public static final Migration MIGRATION_11_12 = new Migration(11, 12) { @Override ...
1
vote
1answer
23 views

Symfony 4 migrations migrate failed during Execution

my problem is I want to use the php bin/console make:migration php bin/console doctrine:migrations:migrate approach of Symfony 4 to update my database instead of using: php bin/console doctrine:...
0
votes
1answer
22 views

Using SQLAlchemy to migrate databases (sqlite to Postgres CloudSQL)

Trying to migrate the database for an early project of mine to the cloud. Although the code that built everything is janky, the db structure and data itself are fairly sound. I could probably figure ...
0
votes
0answers
28 views

How to write migration test for room database if I change column name of database

Previously, if I add a column in database I wrote migration test like following @Test public void writeUserAndReadInList() throws Exception { User user = TestUtil.createUser(3); ...
0
votes
0answers
32 views

How to migrate the whole database from Postgres to DynamoDB

I have a database in PostgreSQL. Now we need to import whole database into DynamoDB. Data Migration service need to be used for this purpose or any other service can be used. Please explain in detail. ...
0
votes
0answers
27 views

SQL Server Native Client Datetime field overflow during migration

I try to migrate from oracle db to sqlserver, after a lot of tries and search, I use SQLines Data to help me creating the script and migrate the data. I face set of problems the most important one ...
0
votes
1answer
23 views

How to drop all the tables in Codeigniter using Migration library

I have created migrations files in Codeigniter 3 for the database using the Migration library provided by the CI and with the help of the online tutorials. My migrations file look like this, <?php ...
0
votes
5answers
74 views

Getting foreign key constraint incorrectly formed issue on laravel migration

I want to build Chatter Package for my laravel 5.8 project, but getting error in this migration, file, it is trying to create table with name of database, don't know why please try to help ...
0
votes
1answer
8 views

“No changes detected in your mapping information” when adding Gedmo Timestampable trait

I have added a trait to my existing SentNewsletter class. So it now looks like this: ... use Gedmo\Timestampable\Traits\Timestampable; /** * SentNewsletter * * @ORM\Table(name="sent_newsletter") ...
-1
votes
0answers
14 views

Which is the best way to manage your migrations?

If multiple developers working on same project, so how do we manage migrations on prod and stage server. What is the best way to manage migrations? And which process we should follow to manage?
0
votes
0answers
16 views

Camunda use separate user for database creation scripts

In my Camunda Spring Boot application I use application.properties to set database connection information, i.e spring.datasource.url=<database url> spring.datasource.username=<app username&...
-1
votes
0answers
25 views

Migration of oracle database into PostgreSQL database

Recently, My Firm is working on Oracle DB Now we are about to migrating our data. We have client most-of Bank. We are Migrating in this 2 months. I used pgAdmin4. Actually most of things are going ...
-2
votes
0answers
11 views

What does Up and Down mean in Database Migrations?

I've seen database migration scripts that use the term Up and Down. What does this mean?
0
votes
1answer
19 views

How to version seeds in Knex?

I have a sql file where I write sentences for run in release, this file contains sentences like: -- =======================2019-02-01======================= UPDATE rating set stars = 3 where id = 6; ...
0
votes
0answers
23 views

MySQL BIT fields import error: Data too long for column

I'm moving an SQL Server database to MySQL. Records are exported with bcp and everything should be fine but in the destination database boolean fields are generated to be BIT type. (EF Core 2.2) The ...
0
votes
1answer
56 views

Add new column to table

I'm still new as a developer and I'm trying to change user table, were I add a new column "user_type" from the previous table. My question is: Can I do that or should I do the php artisan make:...
0
votes
0answers
18 views

How to create index on two columns, with the key ordering (sorting) specified, using sequelize-cli (MS SQL db)?

I'm using the Sequelize-CLI migrations for my project. I want to create a migration that adds the CLUSTERED index on two of my columns (id and date). I want to set the date sorting to DESC Here's ...
0
votes
1answer
23 views

Revert last migration using flyway

flyway has a task called ['Undo']1 that's supposed to revert last migration. But the flyway jar (flyway-core-4.2.0 sources.jar!\org\flywaydb\core\Flyway.java)doesn't have that method so when I run ...
1
vote
0answers
19 views

Android custom migration Sqlcipher from 3 to 4

I upgraded Sqlcipher for Android from 3.5.7 to 4.1.3 in my app. For the existing database, which has been created with Sqlcipher 3, I need a custom migration as it is based on custom parameters, as ...
0
votes
0answers
18 views

AWS DMS MySQL Migration is Stuck, “Full load rows” Keeps increasing

I have a fairly small database (2.5 MB dump) to migrate from AWS EC2 instance to Aurora (mariadb 10 to Aurora 5.7) Migration sticks on one of the tables. Even though the table has only ~1300 rows, ...
0
votes
0answers
14 views

How Do I Perform Gitlab CI/CD Database Migration For CodeIgniter?

I have a CodeIgniter project that is using Gitlab as repository. I am trying to setup GFitlab CI/CD to Build, Test and Deploy to my AWS server. I am now stuck on how to update any database changes ...
0
votes
0answers
30 views

Grails 4 : Database Migration plugin issue

Since upgrading to Grails 4, the migration scripts do not appear to be getting loaded from where they are configured. This results in the following error; liquibase.exception....
0
votes
0answers
16 views

How to specify directory path during migrations run

How can I specify the directory to use for migrations while running the migrations with phinx, I am looking for something like vendor/bin/phinx migrate --path = path/to/directory
2
votes
4answers
52 views

What is the best way to copy data from one field to another when creating a migration of a new field?

I have a database table having a field that has a boolean field type. Now, as per the new requirement, the field should be changed to the small integer type. In order to achieve it, I created a ...
0
votes
0answers
7 views

Error generating migrations with postgres type fields

In my laravel 5.5.18 version I use https://github.com/Xethron/migrations-generator (version "^2.0") and running migration generator from postgres (PostgreSQL 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1) on ...
0
votes
0answers
33 views

Core Data: constraints changes required migration

My old ManagedObject model looks like below, with constraints: [trackURL] @objc(TrackDownloadInfo) public class TrackDownloadInfo: NSManagedObject { @NSManaged public var trackURL: String @...
-2
votes
1answer
50 views

Flask Migration integration in sqlite database

I am trying to integrate migration in the SQLite database in my Flask app. I have used set FLASK_APP = Basic.py in the terminal of Pycharm of the project directory then run flask db init But it ...
0
votes
0answers
14 views

Working with AWS SCT on linux (RHEL) without GUI

I am very new to AWS, I am exploring the options for migrating an Oracle DB(hive metastore) from an on-premise Hortonworks hadoop cluster to a Postgres DB on Amazon RDS. I came upon Amazon DMS and SCT ...
0
votes
2answers
39 views

How to fix 'Cannot add foreign key constraint' error (string columns)

I need to create foreign key between two tables. Analogically to this SQL query: `alter table `katalog` add constraint `katalog_atribut_foreign` foreign key (`atribut`) references `polozka_sabl` (`...
0
votes
0answers
11 views

CQL - export set of UDF to another table

Let's say I have a meeting table with some fields. Among these fields there is a tasks field, which is a set of task. This task thing, in turn, is an user defined type. Now I don't want to store task'...
3
votes
1answer
44 views

Update rows on room migrations

Is it possible to write migrations to update all previous data of some table? I'm developing enrypition for my room data and would be nice if I could enrypt all rows after migration
0
votes
1answer
48 views

Error: Migration is required due to the following errors in React native (Realm)

We are getting error like for following while APK file installation for particular OS version ( 8.0) in Android. But, This is working fine while development. Error is following Error: Migration is ...
0
votes
1answer
24 views

all doctrine migration alter same table and no change in db

On symfony 4.3 (doctrine 2.10) all migrations contain the same lines, even without entity changes... example: ALTER TABLE file_master CHANGE file_name file_name VARCHAR(255) DEFAULT NULL') do ...
1
vote
2answers
40 views

Error when migrating with Laravel in Heroku to Postgres

I'm working with Laravel 5.6 and Heroku with Postgres database. I have uploaded my application to Heroku, the login form shows it to me correctly. The problem comes when doing the migration of the ...
3
votes
0answers
39 views

When generating script using update-database -script it also creates create script for _MigrationHistory?

My application has around 300 migrations out of that around 260 are already in the production, now we have to release a new version of the software with those newly added migrations. Generally, we ...
0
votes
0answers
39 views

Why does importing copies of the database dump and the document root make WordPress data inconsistent?

I'm experiencing the following problem: I have a local copy of my WordPress site and a corresponding live version on my server. I added some new blog categories on my local version and created some ...
1
vote
1answer
57 views

Is Event Sourcing helpful to Machine Learning

I am new to Event Sourcing, Event Store, Message Store and Machine Learning. And we are planning to implement message store and the reason they mentioned about implementing message store (instead ...
0
votes
0answers
25 views

How to direct migrations to a specific tablespace

I am trying to add tables to a secondary tablespace in an existing project and cannot figure out why Rails migrates both tablespaces. Running rake db:migrate_new migrates in the new tablespace, just ...
0
votes
0answers
16 views

How to fix 'Migration table not found' error in lumen 5.4 when used multiple database connections?

I am using multiple database connections in my lumen-5.4 application. For which I have created config/database.php in my project directory. return [ 'default' => 'db1', 'connections' =>...
0
votes
2answers
79 views

How to create a new database by Yii2 migration, when I have to use it by default?

I have a task which is described like "Creating a new database with Yii2 migration, and use it by default". But I have some collusion: I have to set up at lest one default database in my main-local....
0
votes
1answer
16 views

Rake db:migrate rails with error undefined method `session_store_host`

I have several databases across various geolocations. Each has its own representation in my database.yml file. When running RAILS_ENV=europe rake db:migrate I am getting the following error ...
0
votes
0answers
12 views

How to use op.execute in alembic upgrade

I have a table named orders which has a column named amount which initially contains certain null values. I am converting it to nullable=False with a default value of 0 for any new orders but in the ...
0
votes
0answers
27 views

ObjectionJs andWhereRaw is not a function with postgres and nodejs

I am trying to understand why I'm getting a TypeError: ____.andWhereRaw is not a function using ObjectionJs with Postgres and how to resolve this error. const { Model } = require('objection') // ...
0
votes
0answers
20 views

Django Migration Best Practices Post-Release

I'm working with a team on a Django 1.8 project that just started utilizing migrations. I'm attempting to understand best practices for migrating so releases go smoothly in the future. What I don't ...
0
votes
0answers
7 views

ODBC Data Source Driver is not creating the schema correctly for the JSON in CosmosDB

My JSON file in CosmosDB: [ { "id": "15447", "Name": { "First": "Regina", "Last": "Madan" }, "Orders": [ { "OrderID": "58744", "OrderDate": "2013-10-27", "OrderNumber": "...
0
votes
0answers
14 views

Laravel Command to migrate tables not copying all records

I have created a way to migrate data from one DB to another. The problem comes into play where there are about 15k rows and Laravel only copies about 12k or 12.5k or 13k. It ranges each time. Its like ...
0
votes
0answers
60 views

Database migrations in Flask without SQLAlchemy

Is there any library or tool to perform database migrations in python without SQLAlchemy? I am using a PostgreSQL database and the queries are raw SQL. I use psycopg2 for the database connection.
1
vote
1answer
106 views

A space in front of column in table when created from Laravel migration

Does anyone run into an issue like me, have extra spaces when I created a table via Laravel migration? And I'd re-ran couples of time for this migration file and still created extra spaces. My ...
0
votes
0answers
27 views

content and footer not populating

Post migration, wp html5blank template, zero errors posted on debug or in browser, index posts but no additional pages or assets, replaced func, disabled all plugins, cycled versions of php, udated ...