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
12 views

SQLLITE move column and its data from TableA to TableB

i have two tables below table_a with columns (id, table_bId, name, address, postcode, allowedPermisions) table_b with columns (id, type, level, info) I want to create a migration strategy as we now ...
0
votes
3answers
14 views

foreign key laravel migration

This is my students migration and I want to have foreign key in it named subject_id: public function up() { Schema::create('students', function (Blueprint $table) { $table->...
0
votes
0answers
18 views

SQLAlchemy column creation order [duplicate]

I am using SQLAlchemy and sqlalchemy-migrate for my project. Now, I want to add a column to already created table, and I want that column to be at a specific position in the table. What I basically ...
0
votes
1answer
31 views

Auto-Increment editable Column

I am looking for the best solution, of a problem I've met. I have several databases, which I allign quite often to have the same data in it. In some referential tables there are Auto-Increment ID ...
0
votes
0answers
12 views

How to migrate Oracle 11g on-premise database to Oracle 18c cloud?

As per my knowledge, Oracle 18c can be installed as on-premise database. But what is actually cloud database? Is it that we download and install 18c on any AWS kind of cloud platform or is it that 18c ...
0
votes
1answer
26 views

laravel 5.8 migration foreign key problems

Ok I'm stuck. Seems like a simple thing and I've seen others have issues as well. I'm using the latest version 5.8.x. I have no issues creating the tables but when I start with a fresh database and ...
1
vote
0answers
22 views

Migration of ASP.NET MVC MySql db to PLESK

I have published my Asp.NET project to the Plesk, It was done successfully. Now I need to update database using PM but it creates table for 'ASPNETROLES' then throws the exception. Specified key ...
0
votes
1answer
35 views

Salesforce migration to SQL Server: SF's primary key is alpha numeric so how do I auto increment?

I have moved the data from Salesforce to SQL Server to use with MS Access as the front end and realize that they use an alphanumeric ID for their ID columns. How do I keep that data for table ...
0
votes
0answers
17 views

Best strategy to flatten multiple database migration scripts

We are using MongoDB at work and have written a simple application that executes database migrations. These migrations usually consist of a single change to a single document type, but it happens that ...
0
votes
1answer
21 views

Retrieve automatic migration fail details

In my ASP.NET Entity Framework 6 project I added a new Model and Controller. I have automatic migration enabled but allowed data loss disabled. When I ran the application after these changes the new ...
2
votes
1answer
41 views

Can't migrate a table to Room do to an error with the way booleans are saved in Sqlite

I've been trying to migrate my app to Room. I'm struggling with a particular table that can't be migrated directly because of the way it has been created. The fields were created with datatype BOOL ...
0
votes
1answer
22 views

Database migration - Old database to newly defined database

I have created new database for my client for his existing application. But now he wants his old data to be dumped in new database. Now I have many questions at this time as I am doing migration task ...
0
votes
0answers
7 views

how to create seeders with “caffeinated/shinobi” on [email protected]?

I'm doing tests to know the framework (laravel) and I came across this "shinobi" addon, I find it very useful but, when it comes to tests, I need to enter information manually.
0
votes
1answer
20 views

Migrate website to a new server while preserving database state

We're about to move our website to a new server and I'm trying to come up with a sound migration plan. Our current setup consists of a single server (A) with a website running under Apache and a ...
1
vote
1answer
27 views

“Migrate” database with NHibernate

I have a program using NHibernate, recently we have made an update to the database model, we have added a table. Now we use SQLite to sync parts of the "central" database to enable a offline support ...
0
votes
0answers
16 views

alembic autogenerate not accounting for new columns

My question I am trying to use alembic's autogenerate functionality, and think I am missing something. I have initialized alembic on my model. I have now added and removed several columns from ...
0
votes
0answers
21 views

Database migration For Aws lambda,Postgresql

Can anyone give me a really good example of using clauida with sequelize & doing db migration from AWS lambda to the database hosted in AWS RDS server.
0
votes
1answer
13 views

AWS DMS - InvalidParameterValueException) when calling the CreateReplicationTask operation: Replication Task Settings document error: Invalid json

I am trying to create a DMS replication task using the AWS DMS cli. I am trying to pass the task settings using a json file like this: aws dms create-replication-task --replication-task-identifier ...
0
votes
1answer
27 views

errno: 150 “Foreign key constraint is incorrectly formed” but check everything I know

The problem When running migration, the last table end up with the error in the title. My database is a local MySQL. The error Illuminate\Database\QueryException : SQLSTATE[HY000]: General ...
0
votes
0answers
38 views

How to set the title in PostgreSQL with dynamic value

I am migrating from Oracle to PostgreSQL,I want to set the title in PostgreSQL. I tried to set the title in POstgresql using \pset title or \C . My oracle code is similar to : TTITLE LEFT 'tag1' ...
0
votes
0answers
8 views

How to use Entity Framework Core migrations without automatic syncing to the model?

A customer has a messy legacy Microsoft SQL Server database (running in 2008 compatibility level, which cannot be upgraded) with mixed naming strategies, missing foreign keys etc. etc. Unfortunately ...
1
vote
1answer
21 views

How to append new data to the log file in PostgreSQL

I am migrating oracle code to postgresql where i need to append the query to existing log file. Basically i want equivalent of oracle command " SPOOL test.log APPEND " in PostgreSQL . Is there a way ...
1
vote
1answer
16 views

Do I have to write the reverse operation for migration rollback?

I use knex.js and it's good query builder for PostgreSQL. I haven't found any docs to explain how to do the migration rollback in a right way. For now, I just write the reverse migrate operation in ...
0
votes
1answer
27 views

Create.io Order of column when creating a table

I have CrateDb version 3.2.7 running under Windows Server 2012. I create a table like this: create table test3 (firstcolumn bigint primary key, secondcolumn int, thirdcolumn timestamp, fourthcolumn ...
2
votes
0answers
30 views

How to handle patches that contains database migrations in long-term supported (LTS) software versions

I am currently working on a project, where we want to give long-term support (LTS) for some specific "LTS versions" which we will release in the future. Like the name says, we want to give support (...
2
votes
0answers
66 views

makemigration causing error “TypeError: expected str, bytes or os.PathLike object, not NoneType”

Running makemigration command inside docker container caused this error, can anyone please help me figure out what the problem is ? python3.7 manage.py makemigrations Traceback (most recent call ...
-2
votes
0answers
27 views

How to write a migration script to update across different database instances

I need to update tables using migration script in SQL Server across 30 different database instances. The issue I have is that foreign key name is not same in the tables. How could I write a query ...
0
votes
0answers
24 views

I'm migration database from SQLServer to Postgres, but i came across the following error, can anybody help me?

Is this erro output in console I am migrating a project in Java 7, and one of the demands passed by the client is the migration of the database from SQLSERVER to POSTGRES, so I migrated the ...
1
vote
1answer
57 views

General error: 1364 Field 'manufacturer_name' doesn't have a default value

I get manufacturer name has no value even tho it references id column in manufacturer table which is already created in database and sits in the same row with manufacturer name. Why is so? Here is ...
0
votes
0answers
13 views

AWS DMS replication instance unable to connect local machine SQL Server test endpoint

I am trying to migrate & replicate on-premise SQL Server DB to Aurora DB in AWS. From the AWS docs., it seems it is possible. However, when I tried to implement I faced few problems as below: ...
-4
votes
1answer
32 views

MS access to SQL Server migration issue

I have a sql query below select LTRIM(RTRIM(Sub string([Short Description],9,Len([Short Description])-8))) AS PolicyNumber from x table its giving error as this Msg 537, Level 16, State 3, Line ...
0
votes
1answer
28 views

How to configure Aurora MySQL target database?

I am doing the following step, to configure Aurora target DB, while migrating local SQL Server DB to Aurora DB in cloud: https://docs.aws.amazon.com/dms/latest/sbs/CHAP_SQLServer2Aurora.Steps....
0
votes
1answer
34 views

Apply Migration Scripts on docker startup

I am Unable to initialise database with schema evolution manager on docker startup. My docker file is as follows FROM postgres:10-alpine WORKDIR /opt/ext-api-db COPY . . RUN apk add py-pip ruby ...
0
votes
0answers
30 views

mysql apply only required changes

I have 2 DB instances running on dev and prod. In dev I have created a table students with the following schema create table students (name varchar(20), age int, place varchar(100)); I created the ...
1
vote
0answers
23 views

Symfony | How to fix migration MySQL syntax error [duplicate]

I am creating a login/registration system because I have never made one before. Using the Symfony framework, I am following their documentation (https://symfony.com/doc/current/security.html). It ...
0
votes
2answers
79 views

How to migrate from Cloud Datastore to Cloud Spanner?

I'm looking at dataflow to try to export data from Datastore to Spanner. Spanner seems to only accept avro files via a dataflow connector. The only dataflow template I can find is from datastore to ...
0
votes
0answers
20 views

Argument 1 passed to Illuminate\Database\Query\Builder::insert() must be of the type array, null given

Good afternoon, I have a problem I've been trawling over for a few days and cant seem to get my head around. Just wondering if someone could please point me in the right direction. I'm using : - ...
2
votes
0answers
33 views

Migration Relationship To-One to To-Many Result on Empty NSSet

I encounter a problem when I migrate models. Firstly, I had a user with an article. I made models like this: Now, I made a second version for the models like this: And in my AppDelegate, I call ...
0
votes
0answers
11 views

Maria DB Migration

This is about database migration. The DB is MariaDB 10.3.2. The source and target DB are the same version of Maria DB. I want to migrate a database (say X) to another instance (say Y). Database X has ...
0
votes
1answer
28 views

How to migrate a database by changing a column type from string type to Date type

I am trying to migrate a database by changing a column's type from String to Date type. Here is what I did which is did not yield expected results... public static final Migration MIGRATION_1_2 = ...
0
votes
2answers
39 views

Dockerized Django: how to manage sql scripts in migrations?

Fairly new to Docker, I am trying to add the execution of a custom sql script (triggers and functions) to Django's migration process and I am starting to feel a bit lost. Overall, What I am trying to ...
0
votes
1answer
15 views

Another reason of django.db.migrations.exceptions.InconsistentMigrationHistory

Why else django.db.migrations.exceptions.InconsistentMigrationHistory exception may happen while trying to do migrations in Django?
0
votes
1answer
40 views

Data migration from SQL Server to Postgres

Using SQLLINES I am trying to migrate from SQL Server to Postgres. http://www.sqlines.com/home My problem is that the data once migrated (type nvarchar in SQL Server) is translated to text or varchar ...
0
votes
2answers
26 views

rails application on docker-compose: db:migration shows “Permission denied”

I'm running a rails app on docker-compose image. After I created a user devise, when I run docker-compose run web rails db:migrate it shows the following error: PG::ConnectionBad: FATAL: could not ...
0
votes
1answer
20 views

Does Flyway have a “database name” placeholder we can use in our SQL migrations?

I would like to know if flyway has some kind of predefined placeholders we can use in our SQL migration scripts ? What I am trying to do is to execute a few commands in the master database before ...
0
votes
3answers
57 views

Unexplained 'Invalid Operation' error in Access query with SQL backend

I am trying to migrate the entire backend of an Access application onto SQL Server. The first part of my project involves moving all of the tables whilst making minimum changes after the migration (no ...
0
votes
1answer
31 views

How to create a script that can migrate database to another normalized database

I have an existing system with hundred thousands of data. I need to migrate it to another database but different structure. How can i create a script that will migrate database to a different ...
0
votes
1answer
48 views

The entity type 'ModeratedUser' requires a primary key to be defined

I am experiencing an error with AspNetCore.Identity.EntityFrameworkCore 2.1.6 using code-first database migrations. The error is The entity type 'ModeratedUser' requires a primary key to be ...
0
votes
1answer
27 views

1215 Cannot add foreign key constraint in laravel 5, foreign key

2019_04_23_164151_create_contacts_table.php migration file <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; ...
2
votes
1answer
33 views

Flyway clean failing to clean due to drop constraint

I am trying to clean my MSSQL database. I have this working on some of my databases, but on one of them, I am getting the following error. Unable to clean schema [dbo] ---------------------------- ...