1

django 2.2.1

Legacy database was created via sql code and I want to get model via inspectdb. The problem column was created as times VARCHAR[]

When I run inspectdb > models.py - execution failed with an error. The models.py file was created as empty file and I see error in console:

times = ArrayField(blank=True, null=True) #This field type is a guess TypeError: __init__() missing 1 required positional argument 'base_field'

For this legacy database -

1) Should I overwrite every table manually since inspection is failed?

2) Could I use database cursor without any models (in production too) ?

3) Are there other solutions?

Vova
  • 563
  • 8
  • 20

0 Answers0