aboutsummaryrefslogtreecommitdiff
path: root/migrations/versions/d158cf8f4950_.py
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-07-14 19:51:45 +0200
committerKaran Jayachandra <mail@karanjayachandra.com>2025-07-14 19:51:45 +0200
commit4aee68096c11ce1e3762fb8cffbde2a14dfa3cd0 (patch)
tree4ce0642a088fd2370ad0992916d5d41093bedc48 /migrations/versions/d158cf8f4950_.py
parent0396e1fbb46c7256095f05e37f2747baa3e20c73 (diff)
Added the login for changes
Diffstat (limited to 'migrations/versions/d158cf8f4950_.py')
-rw-r--r--migrations/versions/d158cf8f4950_.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/migrations/versions/d158cf8f4950_.py b/migrations/versions/d158cf8f4950_.py
index 392d3bf..ba0ef5b 100644
--- a/migrations/versions/d158cf8f4950_.py
+++ b/migrations/versions/d158cf8f4950_.py
@@ -1,16 +1,17 @@
"""empty message
Revision ID: d158cf8f4950
-Revises:
+Revises:
Create Date: 2025-07-06 15:31:24.124657
"""
+
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
-revision = 'd158cf8f4950'
+revision = "d158cf8f4950"
down_revision = None
branch_labels = None
depends_on = None
@@ -18,22 +19,23 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
- op.create_table('user',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('username', sa.String(length=64), nullable=False),
- sa.Column('password_hash', sa.String(length=256), nullable=True),
- sa.PrimaryKeyConstraint('id')
+ op.create_table(
+ "user",
+ sa.Column("id", sa.Integer(), nullable=False),
+ sa.Column("username", sa.String(length=64), nullable=False),
+ sa.Column("password_hash", sa.String(length=256), nullable=True),
+ sa.PrimaryKeyConstraint("id"),
)
- with op.batch_alter_table('user', schema=None) as batch_op:
- batch_op.create_index(batch_op.f('ix_user_username'), ['username'], unique=True)
+ with op.batch_alter_table("user", schema=None) as batch_op:
+ batch_op.create_index(batch_op.f("ix_user_username"), ["username"], unique=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
- with op.batch_alter_table('user', schema=None) as batch_op:
- batch_op.drop_index(batch_op.f('ix_user_username'))
+ with op.batch_alter_table("user", schema=None) as batch_op:
+ batch_op.drop_index(batch_op.f("ix_user_username"))
- op.drop_table('user')
+ op.drop_table("user")
# ### end Alembic commands ###