Skip to content

Commit 0c883bb

Browse files
authored
fixup migration: add to enum directly rather than using sync_enum (#17427)
1 parent 902251f commit 0c883bb

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

warehouse/migrations/versions/12a43f12cc18_add_new_lifecycle_statuses.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,7 @@
2424

2525

2626
def upgrade():
27-
op.execute("SET statement_timeout = 60000")
28-
op.execute("SET lock_timeout = 120000")
29-
30-
op.sync_enum_values(
31-
"public",
32-
"lifecyclestatus",
33-
["quarantine-enter", "quarantine-exit", "archived"],
34-
[
35-
TableReference(
36-
table_schema="public",
37-
table_name="projects",
38-
column_name="lifecycle_status",
39-
)
40-
],
41-
enum_values_to_rename=[],
42-
)
27+
op.execute("ALTER TYPE public.lifecyclestatus ADD VALUE IF NOT EXISTS 'archived'")
4328

4429

4530
def downgrade():

0 commit comments

Comments
 (0)