matrix-bot-praying-times/alembic/versions/12669d9a145b_initial_migration.py
Finn Christiansen 9a2a18172c
Some checks failed
ci / docker (push) Successful in 4m54s
Python formatting PEP8 / Python-PEP8 (push) Failing after 13s
🗃️ Add basic database support using SQLAlchemy and Alembic
2024-06-16 20:57:18 +02:00

37 lines
1 KiB
Python

"""Initial migration
Revision ID: 12669d9a145b
Revises:
Create Date: 2024-06-16 20:53:32.463819
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '12669d9a145b'
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('username', sa.String(), nullable=True),
sa.Column('location', sa.String(), nullable=True),
sa.Column('room_id', sa.String(), nullable=True),
sa.Column('reminder_time_in_minutes', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user')
# ### end Alembic commands ###