add sqlmodel + alembic + setup models skeleton to slowly enable transition towards a db

This commit is contained in:
Viktor Barzin 2025-06-03 20:00:30 +00:00
parent 8c646a5322
commit 0d3393ed94
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
11 changed files with 697 additions and 1 deletions

View file

@ -0,0 +1,35 @@
"""Create listing table
Revision ID: 0e804449c31d
Revises:
Create Date: 2025-06-03 19:54:41.526943
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '0e804449c31d'
down_revision: Union[str, None] = None
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.create_table('listing',
sa.Column('id', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('listing')
# ### end Alembic commands ###