Unable to create the django_migrations table (ORA-02000: missing ALWAYS keyword)

后端 未结 2 1440
悲&欢浪女
悲&欢浪女 2021-01-13 06:46

I\'m starting a project in Django-2.0.1 with a database Oracle 11g, and when I run $python manage.py migrate, I get the error django.db.migrations.exceptions.MigrationSchema

相关标签:
2条回答
  • 2021-01-13 07:13

    version problem
    in this.py add:

    print(sql)
    return self.cursor.execute(sql)
    

    then run:

    python manage.py migrate
    

    You can see the problem. while Django creates an Oracle table use 'GENERATED BY DEFAULT ON NULL' that is Oracle 12c new characteristics. So you can change Oracle to 12c or change ox_oracle version.

    0 讨论(0)
  • 2021-01-13 07:17

    I have faced the same issues during migration. I downgraded Django version to 1.1 and changed some codes in base.py for Oracle database as given in a link and it's working fine now.

    0 讨论(0)
提交回复
热议问题