backend+ telegram: регистрация переведена на классы

This commit is contained in:
2022-11-18 18:27:53 +03:00
parent 82dfc158e9
commit 210938fd78
10 changed files with 94 additions and 49 deletions

View File

@@ -1,8 +1,8 @@
"""empty message
Revision ID: 226bb7e77b6b
Revision ID: 8f02337dbef0
Revises:
Create Date: 2022-11-17 22:55:34.747233
Create Date: 2022-11-18 17:37:55.798611
"""
from alembic import op
@@ -10,7 +10,7 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '226bb7e77b6b'
revision = '8f02337dbef0'
down_revision = None
branch_labels = None
depends_on = None
@@ -19,15 +19,13 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('users',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('tg_id', sa.Integer(), nullable=False),
sa.Column('id', sa.Integer(), autoincrement=False, nullable=False),
sa.Column('first_name', sa.String(length=255), nullable=True),
sa.Column('last_name', sa.String(length=255), nullable=True),
sa.Column('username', sa.String(length=255), nullable=False),
sa.Column('registered_on', sa.DateTime(), nullable=False),
sa.Column('is_admin', sa.Boolean(), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('tg_id')
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###