0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Migration authtoken.0001_initial is applied before its dependency account.0001_initial on database 'default'.

Posted at

djangoでmigrateしていると

django.db.migrations.exceptions.InconsistentMigrationHistory: Migration authtoken.0001_initial is applied before its dependency account.0001_initial on database 'default'.
というエラーが出た。

settings.py
INSTALLED_APPS = [
    'account.apps.AccountConfig',
    # 'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'app',
    'pms_api',
    'rest_framework',
    # 'rest_framework.authtoken',
    'storages',
]

rest_framework.authtoken が悪さしてるっぽいので、コメントアウトしてマイグレーションすると通る
済んだらコメントアウトを消すこと。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?