File size: 991 Bytes
7a88b43 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
"""new migration
Revision ID: 0c372b179073
Revises:
Create Date: 2025-04-16 14:55:45.297069
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0c372b179073'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
op.create_table(
"users",
sa.Column("firebase_uid", sa.String(), nullable=False),
sa.Column("email", sa.String(), nullable=False),
sa.Column("display_name", sa.String(), nullable=True),
sa.Column("is_active", sa.Boolean(), nullable=False, server_default='true'),
sa.Column("created_at", sa.DateTime(), nullable=False, server_default=sa.text('CURRENT_TIMESTAMP')),
sa.Column("last_login", sa.DateTime(), nullable=True),
sa.Column("provider", sa.String(), nullable=False, server_default='email'),
sa.PrimaryKeyConstraint("firebase_uid"),
sa.UniqueConstraint("email"),
)
def downgrade():
op.drop_table("users")
|