Skip to content

Commit

Permalink
Update migration for nullable root_fastly_domain
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansick committed Nov 8, 2021
1 parent daecfee commit 464895c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions migrations/versions/8c431c5e70a8_v2_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ def upgrade():
op.execute("UPDATE products SET organization_id = 1")
# Make products.organization_id non-nullable
op.alter_column("products", "organization_id", nullable=False)
# Make root_fastly_domain nullable
op.alter_column("products", "root_fastly_domain", nullable=True)


def downgrade():
Expand All @@ -169,3 +171,6 @@ def downgrade():
op.drop_table("tags")
op.drop_table("dashboardtemplates")
op.drop_table("organizations")

# Make root_fastly_domain non-nullable
op.alter_column("products", "root_fastly_domain", nullable=False)

0 comments on commit 464895c

Please sign in to comment.