Skip to content

Commit

Permalink
Fix CI due to failing migration
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Jun 24, 2024
1 parent a0da9ef commit c21337b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions migrations/versions/daa040b727b2_.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ def upgrade():
batch_op.add_column(sa.Column("name", sa.String(length=30), nullable=False, server_default=""))
batch_op.add_column(sa.Column("release_notes", sa.UnicodeText(), nullable=True))
batch_op.alter_column("releaseDate", nullable=False, new_column_name="created_at")
batch_op.execute("""
UPDATE package_release SET name = title WHERE length(title) <= 30;
UPDATE package_release SET name = TO_CHAR(created_at, 'YYYY-MM-DD') WHERE name = '';
""")

op.execute("""
UPDATE package_release SET name = title WHERE length(title) <= 30;
UPDATE package_release SET name = TO_CHAR(created_at, 'YYYY-MM-DD') WHERE name = '';
""")



Expand Down

0 comments on commit c21337b

Please sign in to comment.