Questions tagged [schema-migration]

Schema migration refers to altering the data schema used in an application. This may merely involve changing the database, but frequently also involves code alterations.

Schema migration refers to altering the data schema used in an application. This may merely involve changing the database, but frequently also involves code alterations.

Because the data schema is often relatively stable, and code usually embeds assumptions about it, schema-migration must be handled carefully.

64 questions
0
votes
1 answer

django convert datetimefield to datefield with mysql backend

For my django app, I want to convert datetimefield to datefield. That resulting in an error : Date truncation for column ... Can you please tell me how to do this ? I have tried this: I have written a datamigration before schemamigration that…
0
votes
0 answers

How can I go to an older version of schema?

I have a Postgre SQL database in Heroku. I've had some problems. I needed to delete some local migration files and create brand new schema migration files (which worked) that had all migrations included. A relationship from this new schema migration…
Sascuash
  • 3,661
  • 10
  • 46
  • 65
0
votes
1 answer

How Do I insert a schema_migration record on Heroku

I was successful in resolviong this issue locally: I am missing a migration file but am now trying to duplicate the feat on Heroku and do not know how to access the database there. Can anyone guide me through the process?
Brian McDonough
  • 13,829
  • 4
  • 19
  • 23
-2
votes
1 answer

Backfill default values to a column through migration

I have a table(Users). In one of its columns(configs) i added a default value ("A"=>0) through a migration. Now all the new users i create have default value of A but the old users don't. I want to backfill the default value of A for the old users…
1 2 3 4
5