I use Legacy database oracle 11g and there are a seqences.
If I remove number_mymodel
field from my model i have an error: ORA-00904: "MYMODEL"."ID": invalid identifier
if i try
class MyModel(models.Model):
number_mymodel = models.AutoField(primary_key=True ,auto_created=True)
...
it's work, but if I want add in my django admin panel number_Mymodel is NULL so I can't add it.
What should I do with my sequence in database or in my model?
I want that, if I'm adding in django panel it will be autoincrement number_mymodel
in my database.
question from:
https://stackoverflow.com/questions/65839605/i-have-problem-with-autofield-in-my-model-and-seqence-in-oracle-database 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…