1

Question may be similar to this situation but error & version is different

I moved to django-custom-user model from Django built it user model. Database i am using is default ie sqllite as scope of webapp is small.

After all modifications i tried to modify schema using makemigrations/migrate commands, but i am getting below error django.db.utils.OperationalError: table "auth_user" already exists

As i am using Django1.9 i want to know if there is any built in option /steps to migrate data without deleting/abusing database.

--fake-initial      Detect if tables already exist and fake-apply initial
                    migrations if so. Make sure that the current database
                    schema matches your initial migration before using
                    this flag. Django will only check for an existing
                    table name.
Community
  • 1
  • 1
Rohit.M
  • 124
  • 9
  • Have you set `AUTH_USER_MODEL = 'custom_user.EmailUser'` in your settings.py? – ilse2005 Mar 10 '16 at 00:27
  • Yes I did, `# Authentication Settings AUTH_USER_MODEL = 'accounts_user.EmailUser' ` accounts_user is lable set in app.py `class AccountsUserConfig(AppConfig): """Default configuration for custom_user.""" label = 'accounts_user' name = 'accounts' verbose_name = "Custom Email User" ` – Rohit.M Mar 10 '16 at 20:29

0 Answers0