You've already forked Travel-Agent
feat: Reorganized project, added user registration, throttling middleware, help command, profile command
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
"""Added User model
|
||||
|
||||
Revision ID: 5896f08fbd61
|
||||
Revises:
|
||||
Create Date: 2024-03-19 23:25:50.458639
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '5896f08fbd61'
|
||||
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:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
'users',
|
||||
sa.Column('telegram_id', sa.Integer(), nullable=False),
|
||||
sa.Column('username', sa.String(length=20), nullable=False),
|
||||
sa.Column('age', sa.SmallInteger(), nullable=False),
|
||||
sa.Column('bio', sa.String(length=100), nullable=True),
|
||||
sa.Column('sex', sa.String(length=6), nullable=True),
|
||||
sa.Column('country', sa.Text(), nullable=False),
|
||||
sa.Column('city', sa.Text(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('telegram_id'),
|
||||
sa.UniqueConstraint('username'),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('users')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user