File tree 1 file changed +23
-0
lines changed
src/backend/app/migrations/versions
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 20
20
21
21
22
22
def upgrade () -> None :
23
+ # Create the enum type in the database
24
+ image_processing_status_enum = sa .Enum (
25
+ "NOT_STARTED" ,
26
+ "PROCESSING" ,
27
+ "SUCCESS" ,
28
+ "FAILED" ,
29
+ name = "imageprocessingstatus" ,
30
+ )
31
+ image_processing_status_enum .create (
32
+ op .get_bind ()
33
+ ) # Bind the enum type to the database
34
+
23
35
# ### commands auto generated by Alembic - please adjust! ###
24
36
op .add_column (
25
37
"projects" ,
@@ -43,4 +55,15 @@ def upgrade() -> None:
43
55
def downgrade () -> None :
44
56
# ### commands auto generated by Alembic - please adjust! ###
45
57
op .drop_column ("projects" , "image_processing_status" )
58
+
59
+ # Drop the enum type from the database
60
+ image_processing_status_enum = sa .Enum (
61
+ "NOT_STARTED" ,
62
+ "PROCESSING" ,
63
+ "SUCCESS" ,
64
+ "FAILED" ,
65
+ name = "imageprocessingstatus" ,
66
+ )
67
+ image_processing_status_enum .drop (op .get_bind ()) # Drop the enum type
68
+
46
69
# ### end Alembic commands ###
You can’t perform that action at this time.
0 commit comments