Skip to content

Commit

Permalink
Add migration to make user.pubid non-nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomilov committed Jan 14, 2025
1 parent dea5800 commit d6b2e7e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions h/migrations/versions/a122e276f8d1_make_user_pubid_non_nullable.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit d6b2e7e

Please sign in to comment.