New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually. #21
Comments
MySQL 'ALTER TABLE django_content_type DROP COLUMN name' |
There's no ALTER COLUMN in sqlite. I believe your only option is to:
Say you have a table and need to rename "colb" to "col_b": First you rename the old table:
Then create the new table, based on the old table but with the updated column name:
Then copy the contents across from the original table.
Lastly, drop the old table.
Wrapping all this in a BEGIN TRANSACTION; and COMMIT; is also probably a good idea. |
|
ALTER TABLE django_content_type RENAME TO content_type_old; CREATE TABLE "django_content_type" ( INSERT INTO django_content_type(id, app_label,model) DROP TABLE content_type_old; |
as title
The text was updated successfully, but these errors were encountered: