Questions tagged [data-migration]

Data Migration is the movement of data from one location to another and can happen in many forms and many systems. One example of data migration is copying data from one database to another.

Data Migration is the movement of data from one location to another and can happen in many forms and many systems.

One example of data migration is copying data from one database to another.

1297 questions
17
votes
1 answer

Insert data and set foreign keys with Postgres

I have to migrate a large amount of existing data in a Postgres DB after a schema change. In the old schema a country attribute would be stored in the users table. Now the country attribute has been moved into a separate address table: users: …
Pankrat
  • 5,206
  • 4
  • 31
  • 37
17
votes
2 answers

Select & Insert across multiple databases with MySQL

I have 2 identical tables in 2 different databases that reside on the same server. What would be the best way to copy data from table to another?
GSto
  • 41,512
  • 37
  • 133
  • 184
17
votes
2 answers

How can I send signals from within Django migrations?

I use Django 1.7 migrations, and in particular, want to populate a newly-created database with initial data. Thus, I use a data migration for this. It looks like this: def populate_with_initial_data(apps, schema_editor): User =…
Torsten Bronger
  • 9,899
  • 7
  • 34
  • 41
16
votes
2 answers

Django - Filter queryset by CharField value length

Given that I have a legacy model with a CharField or CharField-based model field like: class MyModel(models.Model): name = models.CharField(max_length=1024, ...) ... I need to make migrations to make it have a max_length of max. 255. First…
Gerard
  • 9,088
  • 8
  • 37
  • 52
15
votes
1 answer

iPhone:Updating a Core Data Model in Future Versions of an App

I am releasing a Core Data based app and wondered what I need to consider if, in an update later down the line, I need to change the model. How do I move existing user data on the device from the old data model into a new updated model? Thanks
Chris
  • 366
  • 3
  • 9
14
votes
3 answers

Recommended / Standard handling of Laravel Data Migrations

Laravel ships with database migrations for managing CRUD operations regarding the structure of a database, but what is the appropriate/recommended/standardized way to handle migration of actual data? My question is, should the data migration take…
14
votes
2 answers

How to migrate MySQL data directory in docker container?

I have a docker container running MySQL-5.5 with host data volume. I am upgrading my container to MySQL-5.6. I am starting a new container with the same host volume. MySQL was crashing in the container due to the crash of mysql.user table. [ERROR]…
Gangaraju
  • 4,406
  • 9
  • 45
  • 77
14
votes
4 answers

Migrating from Postgres to SQL Server 2008

I need to migrate a database from Postgres 7 to SQL Server 2008. I am familiar with the SSIS Import and Export wizard but I am stumped about how to define the data source or define the data provider. What is the best way to migrate Postgres to SQL…
reach4thelasers
  • 26,181
  • 22
  • 92
  • 123
14
votes
3 answers

Migrating DATA - not just schema, Rails

Sometimes, data migrations are required. As time passes, code changes and migrations using your domain model are no longer valid and migrations fail. What are the best practices for migrating data? I tried make an example to clarify the…
oma
  • 38,642
  • 11
  • 71
  • 99
14
votes
1 answer

Request a simple alembic working example for Auto Generating Migrations

I installed alembic 0.3.4, sqlalchemy, SQLite version 3.7.4, and upgraded SQLAlchemy 0.6.4 to SQLAlchemy 0.7 or greater from my ubuntu. I followed the instructions linked here: Now I am testing: Auto Generating Migrations I have created a package:…
user1342336
  • 967
  • 2
  • 16
  • 28
13
votes
3 answers

Enclosing a password which contains special characters with curly braces does not work

I am trying to create a data migration task on AWS in order to migrate data from one RDS instance to another. The instance password for the source endpoint contains special characters (+&;) and by enclosing it with curly braces (as it is suggested…
refaktor
  • 181
  • 2
  • 10
13
votes
4 answers

Rails: seeding database data and date formats

I'm trying to seed some data into a Rails 3 app that I'm developing, using the db/seed.rb file and the rake db:seed command. The data I'm seeding involves a database table called Meeting that has three columns: string title, datetime startDate,…
Roddy of the Frozen Peas
  • 14,380
  • 9
  • 49
  • 99
13
votes
3 answers

How to migrate data from MongoDB to SQL-Server?

I searched around I found that there are ways to transfer/sync data from sql-server to mongodb. I also know that Mongodb contains collections instead of table and the data is stored differently. I want to know whether it is possible to move data…
Dr. Mian
  • 3,334
  • 10
  • 45
  • 69
13
votes
1 answer

south migration: DatabaseOperations has not attribute 'shorten_name'

I have a model which I managed to migrate on two different computers without a problem. However on my server I'm getting the following error: Error in migration: some_app:0002_auto__some_migration AttributeError: 'DatabaseOperations' object has no…
Massagran
  • 1,781
  • 1
  • 20
  • 29
13
votes
2 answers

Fastest way to migrate from sql server to sqlite for large datasets

I have a database with more than 32 million records, I have to migrate it from SQL Server to Sqlite. I have tried SSIS (SQL Server Integration Services) with the help of this…
Saw
  • 6,199
  • 11
  • 53
  • 104
1 2
3
86 87