mirror of
https://github.com/Llloooggg/TextSouls.git
synced 2026-03-06 04:26:23 +03:00
backend + telegram: добавлено создание персонажа
This commit is contained in:
44
backend/migrations/versions/02142c549a8c_.py
Normal file
44
backend/migrations/versions/02142c549a8c_.py
Normal file
@@ -0,0 +1,44 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 02142c549a8c
|
||||
Revises: 07950b032eb7
|
||||
Create Date: 2022-11-19 00:29:12.011840
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '02142c549a8c'
|
||||
down_revision = '07950b032eb7'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('character_classes', schema=None) as batch_op:
|
||||
batch_op.create_unique_constraint(None, ['name'])
|
||||
|
||||
with op.batch_alter_table('character_races', schema=None) as batch_op:
|
||||
batch_op.create_unique_constraint(None, ['name'])
|
||||
|
||||
with op.batch_alter_table('characters', schema=None) as batch_op:
|
||||
batch_op.create_unique_constraint(None, ['name'])
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('characters', schema=None) as batch_op:
|
||||
batch_op.drop_constraint(None, type_='unique')
|
||||
|
||||
with op.batch_alter_table('character_races', schema=None) as batch_op:
|
||||
batch_op.drop_constraint(None, type_='unique')
|
||||
|
||||
with op.batch_alter_table('character_classes', schema=None) as batch_op:
|
||||
batch_op.drop_constraint(None, type_='unique')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
36
backend/migrations/versions/07950b032eb7_.py
Normal file
36
backend/migrations/versions/07950b032eb7_.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 07950b032eb7
|
||||
Revises: 5aef83a8a42f
|
||||
Create Date: 2022-11-18 23:40:33.130706
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '07950b032eb7'
|
||||
down_revision = '5aef83a8a42f'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('characters', schema=None) as batch_op:
|
||||
batch_op.alter_column('owner',
|
||||
existing_type=mysql.INTEGER(),
|
||||
nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('characters', schema=None) as batch_op:
|
||||
batch_op.alter_column('owner',
|
||||
existing_type=mysql.INTEGER(),
|
||||
nullable=False)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user