We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--auto
I tried to use the --auto option to generate the migration files. The result is:
def migrate(migrator, database, fake=False, **kwargs): """Write your migrations here.""" @migrator.create_model class BaseModel(pw.Model): @migrator.create_model class BasissetFamily(pw.Model): name = pw.CharField(max_length=255, unique=True) @migrator.create_model class MyModel1(pw.Model): family = pw.ForeignKeyField(db_column='family_id', rel_model=MyModel1, to_field='id') element = pw.CharField(max_length=255) basis = pw.TextField() @migrator.create_model class Model(pw.Model): @migrator.create_model class MyModel2(pw.Model): name = pw.CharField(max_length=255, unique=True)
The problem are the empty bodies for the BaseModel and Model classes which is invalid Python.
BaseModel
Model
The text was updated successfully, but these errors were encountered:
the same goes for the rollback which contains the following invalid lines:
rollback
migrator.remove_model('model') migrator.remove_model('basemodel')
Sorry, something went wrong.
Your models just seem to be empty... you can ignore models by writing IGNORE=['basemodel'] in a conf.py in your migration directory.
IGNORE=['basemodel']
conf.py
rollback is completely valid python, but the models/tables might not be in the database because they are empty or so
No branches or pull requests
I tried to use the
--auto
option to generate the migration files. The result is:The problem are the empty bodies for the
BaseModel
andModel
classes which is invalid Python.The text was updated successfully, but these errors were encountered: