Skip to content
New issue

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

SQL OperationalError due to missing quotation marks around default values #96

Closed
stlehmann opened this issue Aug 22, 2018 · 0 comments
Closed

Comments

@stlehmann
Copy link

Error description

When using pw_migrate with the --auto flag to add a new CharField with a default value to a table it produces code like this:

@migrator.create_model
class Color(pw.Model):
    id = pw.AutoField()
    name = pw.CharField(constraints=[SQL("DEFAULT New Color")], max_length=255)

The last line will lead to an Operational error because there are quotation marks missing around the default values.

System configuration

  • Operarating System: Windows 10
  • Python Version: Python 3.7.0 64bit
  • Peewee Version: 3.6.4
  • peewee_migrate: develop branch
  • database engine: sqlite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant