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

add_fields ignore default value #82

Open
sanjok-bless opened this issue Jun 1, 2018 · 2 comments
Open

add_fields ignore default value #82

sanjok-bless opened this issue Jun 1, 2018 · 2 comments

Comments

@sanjok-bless
Copy link

Migration doesn't set default value for text field if use add_fields

    migrator.add_fields(
        'table_name',

       text=pw.CharField(default='N', constraints=[SQL('DEFAULT "N"')]))

But if I create a model with same field always is good :-/

    @migrator.create_model
    class TableName(pw.Model):
            text=pw.CharField(default='N', constraints=[SQL('DEFAULT "N"')]))

Where is a mistake?

@alexandrukis
Copy link

Anybody looking into this?

@oldsyang
Copy link

I encountered the same problem

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

No branches or pull requests

3 participants