diff --git a/h/migrations/versions/a122e276f8d1_make_user_pubid_non_nullable.py b/h/migrations/versions/a122e276f8d1_make_user_pubid_non_nullable.py new file mode 100644 index 00000000000..36eb54735e1 --- /dev/null +++ b/h/migrations/versions/a122e276f8d1_make_user_pubid_non_nullable.py @@ -0,0 +1,15 @@ +"""Make user.pubid non-nullable.""" + +import sqlalchemy as sa +from alembic import op + +revision = "a122e276f8d1" +down_revision = "f32200e2e496" + + +def upgrade(): + op.alter_column("user", "pubid", existing_type=sa.TEXT(), nullable=False) + + +def downgrade(): + op.alter_column("user", "pubid", existing_type=sa.TEXT(), nullable=True)