"""initial_schema Revision ID: c5e33562d3b5 Revises: Create Date: 2026-02-28 12:01:37.936834 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa from sqlmodel.sql.sqltypes import AutoString # revision identifiers, used by Alembic. revision: str = 'c5e33562d3b5' down_revision: Union[str, Sequence[str], None] = None branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: """Upgrade schema.""" # ### commands auto generated by Alembic - please adjust! ### op.create_table('channel_list', sa.Column('channel_id', AutoString(length=120), nullable=False), sa.Column('channel_name', AutoString(length=120), nullable=True), sa.Column('team_name', AutoString(length=120), nullable=True), sa.PrimaryKeyConstraint('channel_id') ) op.create_table('channel_member_change', sa.Column('id', sa.Integer(), nullable=False), sa.Column('team', AutoString(length=20), nullable=False), sa.Column('channel_id', AutoString(length=20), nullable=False), sa.Column('user_id', AutoString(length=20), nullable=False), sa.Column('is_joined', sa.Boolean(), nullable=False), sa.Column('status_change_time', sa.DateTime(), nullable=False), sa.PrimaryKeyConstraint('id') ) op.create_table('join_team_members', sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_id', AutoString(length=20), nullable=False), sa.Column('email', AutoString(length=120), nullable=False), sa.Column('team', AutoString(length=120), nullable=False), sa.Column('team_join_time', sa.DateTime(), nullable=False), sa.PrimaryKeyConstraint('id') ) op.create_table('link_clicked', sa.Column('id', sa.Integer(), nullable=False), sa.Column('referrer', AutoString(length=200), nullable=True), sa.Column('click_time', sa.DateTime(), nullable=False), sa.PrimaryKeyConstraint('id') ) op.create_table('members_in_channel', sa.Column('channel_id', AutoString(length=120), nullable=False), sa.Column('user_id', AutoString(length=120), nullable=False), sa.PrimaryKeyConstraint('channel_id', 'user_id') ) op.create_table('teams', sa.Column('team_id', AutoString(length=20), nullable=False), sa.Column('team_name', AutoString(length=120), nullable=False), sa.Column('team_domain', AutoString(length=120), nullable=False), sa.Column('team_token', AutoString(length=512), nullable=False), sa.Column('invite_link', AutoString(length=512), nullable=True), sa.PrimaryKeyConstraint('team_id') ) op.create_table('user_invite', sa.Column('id', sa.Integer(), nullable=False), sa.Column('email', AutoString(length=120), nullable=False), sa.Column('referrer', AutoString(length=200), nullable=True), sa.Column('invited_time', sa.DateTime(), nullable=False), sa.Column('team', AutoString(length=120), nullable=False), sa.Column('channel', AutoString(length=120), nullable=False), sa.PrimaryKeyConstraint('id') ) op.create_table('user_list', sa.Column('user_id', AutoString(length=120), nullable=False), sa.Column('team_name', AutoString(length=120), nullable=False), sa.Column('user_name', AutoString(length=120), nullable=True), sa.Column('tz', AutoString(length=120), nullable=True), sa.Column('email', AutoString(length=120), nullable=False), sa.PrimaryKeyConstraint('user_id', 'team_name') ) # ### end Alembic commands ### def downgrade() -> None: """Downgrade schema.""" # ### commands auto generated by Alembic - please adjust! ### op.drop_table('user_list') op.drop_table('user_invite') op.drop_table('teams') op.drop_table('members_in_channel') op.drop_table('link_clicked') op.drop_table('join_team_members') op.drop_table('channel_member_change') op.drop_table('channel_list') # ### end Alembic commands ###