Products Rendering, removal of deprecated files
This commit is contained in:
38
alembic/versions/e9de494cf92c_img_path_file_id_added.py
Normal file
38
alembic/versions/e9de494cf92c_img_path_file_id_added.py
Normal file
@@ -0,0 +1,38 @@
|
||||
"""Img Path + File Id added
|
||||
|
||||
Revision ID: e9de494cf92c
|
||||
Revises: 8756e344268a
|
||||
Create Date: 2026-02-06 19:19:44.437326
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "e9de494cf92c"
|
||||
down_revision: Union[str, Sequence[str], None] = "8756e344268a"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("products", sa.Column("img_path", sa.Text(), nullable=False))
|
||||
op.add_column("products", sa.Column("file_id", sa.Text(), nullable=False))
|
||||
op.create_unique_constraint(None, "products", ["file_id"])
|
||||
op.create_unique_constraint(None, "products", ["img_path"])
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint(None, "products", type_="unique")
|
||||
op.drop_constraint(None, "products", type_="unique")
|
||||
op.drop_column("products", "file_id")
|
||||
op.drop_column("products", "img_path")
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user