Skip to content

Commit

Permalink
1.8.3 alembic migrations added
Browse files Browse the repository at this point in the history
  • Loading branch information
zurdi15 committed May 17, 2023
1 parent 08cb3a9 commit 2d349b8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions backend/alembic/versions/1.8.3_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""update to 1.8.3
Revision ID: 1.8.3
Revises: 1.8.2
Create Date: 2023-05-17 12:59:44.344356
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '1.8.3'
down_revision = '1.8.2'
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("roms") as batch_op:
batch_op.execute("UPDATE roms SET file_path = REPLACE(file_path, '/romm/library/', '')")
batch_op.execute("UPDATE roms SET path_cover_s = REPLACE(path_cover_s, '/romm/resources/', '')")
batch_op.execute("UPDATE roms SET path_cover_l = REPLACE(path_cover_l, '/romm/resources/', '')")
batch_op.execute("UPDATE roms SET path_screenshots = REPLACE(path_screenshots, '/romm/resources/', '')")
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###

0 comments on commit 2d349b8

Please sign in to comment.