catalogue operations, db migr and so on.

pre release version.
This commit is contained in:
2026-03-11 20:26:38 +07:00
parent 1af0cf1826
commit 7f4f8a883d
17 changed files with 284 additions and 63 deletions

View File

@@ -0,0 +1,39 @@
"""product img_path constraints redacted.
Revision ID: 1d2e799ed0f3
Revises: 41a6b57158ea
Create Date: 2026-03-05 20:33:46.459295
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = "1d2e799ed0f3"
down_revision: Union[str, Sequence[str], None] = "41a6b57158ea"
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.alter_column("products", "img_path", existing_type=sa.TEXT(), nullable=True)
op.drop_constraint(op.f("products_img_path_key"), "products", type_="unique")
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_unique_constraint(
op.f("products_img_path_key"),
"products",
["img_path"],
postgresql_nulls_not_distinct=False,
)
op.alter_column("products", "img_path", existing_type=sa.TEXT(), nullable=False)
# ### end Alembic commands ###