Migrating ManyToManyField to null true, blank true, isn’t recognized

That behavior is correct: null doesn’t mean anything at the database level when used with a ManyToManyField. The declaration of a ManyToManyField causes the creation of an intermediate table to hold the relationship, and although Django will create a standard attribute on your model instance for your convenience, there is no actual column representing it … Read more

Migrating existing auth.User data to new Django 1.5 custom user model?

South is more than able to do this migration for you, but you need to be smart and do it in stages. Here’s the step-by-step guide: (This guide presupposed you subclass AbstractUser, not AbstractBaseUser) Before making the switch, make sure that south support is enabled in the application that contains your custom user model (for … Read more

Revert Django 1.7 RemoveField migration

You can manually edit your migration and add AlterField with default value for a field just before RemoveField. It should be safe even after applying migration. That will make RemoveField that will happen after to be reversible. An example. Having field in model summary named profit that was defined before removal like that: profit = … Read more

Currently using Django “Evolution”, is “South” better and worth switching?

I just started using South, and I’m 100% sold on it. It’s also one of the few that’s still under very active development. South should be able to properly handle the issues you’ve describe above. For each change to the db, it creates a file that has 2 methods “foward” and “backwards”. Here’s a sample … Read more

Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually

I think this has something to do with “The removal of ContentType.name“, according to this. But somehow it doesnt work. By manually removing the column name from ‘django_content_type’ table. Eg. ‘ALTER TABLE django_content_type DROP COLUMN name’ I was able to apply the migrations. Maybe this can get you a little bit further at least.

migrating django-model field-name change without losing data

Changing the field name while keeping the DB field Adding an answer for Django 1.8+ (with Django-native migrations, rather than South). Make a migration that first adds a db_column property, and then renames the field. Django understands that the first is a no-op (because it changes the db_column to stay the same), and that the … Read more

django 1.7 migrations — how do I clear all migrations and start over from scratch?

So the step-by-step plan I outlined in my question does work, but instead of deleting rows from the south_migrationhistory database table, I had to delete rows from the django_migrations database table. The command is: DELETE FROM django_migrations WHERE app=’my_app’ Once this is done, you will be able to re-run your migrations from scratch.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)