You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/postgres-database/src/simcore_postgres_database/migration/versions/47dc5c0a138e_preparation_for_osparc_io_migration.py
+26-13Lines changed: 26 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -127,13 +127,20 @@ def upgrade():
127
127
onupdate="CASCADE",
128
128
ondelete="CASCADE",
129
129
)
130
-
op.alter_column(
131
-
"file_meta_data",
132
-
"user_id",
133
-
existing_type=sa.VARCHAR(),
134
-
type_=sa.BigInteger(),
135
-
nullable=False,
136
-
)
130
+
131
+
# op.alter_column(
132
+
# "file_meta_data",
133
+
# "user_id",
134
+
# existing_type=sa.VARCHAR(),
135
+
# type_=sa.BigInteger(),
136
+
# nullable=False,
137
+
# postgresql_using="user_id::bigint",
138
+
# )
139
+
op.execute(
140
+
"ALTER TABLE file_meta_data ALTER COLUMN user_id TYPE BIGINT USING user_id::bigint"
141
+
)
142
+
op.execute("ALTER TABLE file_meta_data ALTER COLUMN user_id SET NOT NULL")
0 commit comments