add webpage info
This commit is contained in:
parent
e4d2e64ce7
commit
959fd1ac86
5 changed files with 83 additions and 8 deletions
45
alembic/versions/2025_09_03_1752-57f67bce2bec_add_webpage.py
Normal file
45
alembic/versions/2025_09_03_1752-57f67bce2bec_add_webpage.py
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
"""add webpage
|
||||
|
||||
Revision ID: 57f67bce2bec
|
||||
Revises: 058739dc7aa6
|
||||
Create Date: 2025-09-03 17:52:10.644879
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '57f67bce2bec'
|
||||
down_revision: Union[str, Sequence[str], None] = '058739dc7aa6'
|
||||
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('webpage',
|
||||
sa.Column('id', sa.String(), nullable=False),
|
||||
sa.Column('n', sa.Integer(), nullable=True),
|
||||
sa.Column('description', sa.String(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
with op.batch_alter_table('webpage', schema=None) as batch_op:
|
||||
batch_op.create_index(batch_op.f('ix_webpage_id'), ['id'], unique=False)
|
||||
batch_op.create_index(batch_op.f('ix_webpage_n'), ['n'], unique=False)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('webpage', schema=None) as batch_op:
|
||||
batch_op.drop_index(batch_op.f('ix_webpage_n'))
|
||||
batch_op.drop_index(batch_op.f('ix_webpage_id'))
|
||||
|
||||
op.drop_table('webpage')
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue