text: """first migration
  
  Revision ID: 32a6ea39c74b
  Revises: 
  Create Date: 2022-04-07 20:25:33.425184
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = '32a6ea39c74b'
  down_revision = None
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('subtask',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('user',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('username', sa.Text(), nullable=True),
      sa.Column('password', sa.Text(), nullable=True),
      sa.Column('roles', sa.Text(), nullable=True),
      sa.Column('is_active', sa.Boolean(), server_default='true', nullable=True),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('username')
      )
      op.create_table('project',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.Column('title', sa.String(length=32), nullable=True),
      sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('theme',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('project_id', sa.Integer(), nullable=False),
      sa.Column('title', sa.String(length=64), nullable=True),
      sa.Column('color', sa.String(length=24), nullable=True),
      sa.ForeignKeyConstraint(['project_id'], ['project.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('timebox',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('title', sa.String(length=32), nullable=True),
      sa.Column('project_id', sa.Integer(), nullable=True),
      sa.Column('start_time', sa.DateTime(), nullable=True),
      sa.Column('end_time', sa.DateTime(), nullable=True),
      sa.Column('status', sa.String(length=32), nullable=True),
      sa.ForeignKeyConstraint(['project_id'], ['project.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('goal',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('title', sa.String(length=128), nullable=True),
      sa.Column('timebox_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['timebox_id'], ['timebox.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('task',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('theme_id', sa.Integer(), nullable=True),
      sa.Column('project_id', sa.Integer(), nullable=False),
      sa.Column('title', sa.String(length=128), nullable=True),
      sa.Column('status', sa.String(length=32), nullable=True),
      sa.Column('created', sa.DateTime(), nullable=True),
      sa.Column('timebox_id', sa.Integer(), nullable=True),
      sa.Column('priority', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['project_id'], ['project.id'], ),
      sa.ForeignKeyConstraint(['theme_id'], ['theme.id'], ),
      sa.ForeignKeyConstraint(['timebox_id'], ['timebox.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_index(op.f('ix_task_status'), 'task', ['status'], unique=False)
      op.create_table('status_update',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('task_id', sa.Integer(), nullable=True),
      sa.Column('from_status', sa.String(length=32), nullable=True),
      sa.Column('to_status', sa.String(length=32), nullable=True),
      sa.Column('timestamp', sa.DateTime(), nullable=True),
      sa.ForeignKeyConstraint(['task_id'], ['task.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('status_update')
      op.drop_index(op.f('ix_task_status'), table_name='task')
      op.drop_table('task')
      op.drop_table('goal')
      op.drop_table('timebox')
      op.drop_table('theme')
      op.drop_table('project')
      op.drop_table('user')
      op.drop_table('subtask')
      # ### end Alembic commands ###
  