Reputation: 337
I have an existing database in Oracle 11.2
.
I am trying to use inspectdb
utility of django
to automatically create the models but I am getting the error:
ORA-00904: "IDENTITY_COLUMN": invalid identifier
There is no column named IDENTITY_COLUMN
in any of the tables and since I am not directly accessing the database, the chances of misspelling a column name or accessing a wrong column is not possible.
It would be very helpful if someone can give a direction as to what to fix to solve this error.
Upvotes: 1
Views: 2517
Reputation: 485
Same thing happened to me . First downgrade your django into a lower version (1.11.22) and run
python manage.py inspectdb > your_app_name/models.py
Then upgrade to whatever version you are using . I was using 3.0.4
Upvotes: 2
Reputation: 33
I had a similar problem also working with Oracle 11.2
I downgraded Django===2.1 to Django===1.11.13 temporarily to run inspectdb as a work around since my legacy models needed to be manually cleaned up anyway, but it was a good place to start for reverse engineering models from a legacy db.
Upvotes: 2
Reputation: 16505
I'm not sure if it is possible.
The docs don't mention Oracle
:
inspectdb works with
PostgreSQL
,MySQL
andSQLite
.
But a user said they got it working, for example this comment in a previous question. See also this older question for some hints.
Upvotes: 1