django.db.migrations.exceptions.MigrationSchemaMissing:无法创建django_migrations表(ORA-02000:缺少ALWAYS关键字)

时间:2018-11-07 03:29:37

标签: python django

我是django的新手,如果有人可以帮助我进行配置,我们将不胜感激。 我想在settings.py文件中使用我的oracle数据库。 我通过查看tnsnames.ora对它进行了一些更改。 以下是我的更改:

tnsnames.ora

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Kathayat)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA = 
  (DESCRIPTION = 
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) 
    ) 
    (CONNECT_DATA = 
      (SID = CLRExtProc) 
      (PRESENTATION = RO) 
    ) 
  ) 

settings.py

DATABASES = {
    'default':{
        'ENGINE': 'django.db.backends.oracle',
        'NAME' : 'XE',
        'USER' : 'SYSTEM',
        'PASSWORD' : 'password',
        'HOST' : 'Kathayat',
        'PORT' : 1521,
    }
}

运行python manage.py migration之后,我得到了错误消息:

django.db.migrations.exceptions.MigrationSchemaMissing:无法创建django_migrations表(ORA-02000:缺少ALWAYS关键字)

0 个答案:

没有答案