points added; rating still isn't fixed

This commit is contained in:
2023-08-08 19:00:06 +03:00
parent 5bdad31dae
commit bd863bc911
6 changed files with 69 additions and 20 deletions

View File

@ -0,0 +1,38 @@
"""points field added to User model
Revision ID: a991606e0a35
Revises: ee035dd94fbb
Create Date: 2023-08-08 17:55:21.011642
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a991606e0a35'
down_revision = 'ee035dd94fbb'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
# with op.batch_alter_table('trashboxes', schema=None) as batch_op:
# batch_op.create_foreign_key(None, 'users', ['user_id'], ['id'])
with op.batch_alter_table('users', schema=None) as batch_op:
batch_op.add_column(sa.Column('points', sa.Integer(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('users', schema=None) as batch_op:
batch_op.drop_column('points')
# with op.batch_alter_table('trashboxes', schema=None) as batch_op:
# batch_op.drop_constraint(None, type_='foreignkey')
# ### end Alembic commands ###