0

I would like to change the format of a model property and its name. The property must be unique and not nullable.

It is unclear to me as to how I would go about making the migration for this stuation.

Model before migration:

class MyModel(db.Model):
        hexdata = db.Column(db.String, nullable=False, unique=True)

Model after migration:

class MyModel(db.Model):
        base64data = db.Column(db.String, nullable=False, unique=True)
Celeo
  • 5,583
  • 8
  • 39
  • 41
Fabian Barkhau
  • 1,349
  • 2
  • 12
  • 31

0 Answers0