text: """V1.0-RC.1
  
  Revision ID: b389abb05262
  Revises: 
  Create Date: 2020-07-25 15:41:23.517147
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = 'b389abb05262'
  down_revision = None
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('requests',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('submit_time', sa.DateTime(), nullable=False),
      sa.Column('did', sa.String(length=512), nullable=False),
      sa.Column('columns', sa.String(length=1024), nullable=True),
      sa.Column('selection', sa.String(length=10485760), nullable=True),
      sa.Column('tree_name', sa.String(length=512), nullable=True),
      sa.Column('request_id', sa.String(length=48), nullable=False),
      sa.Column('image', sa.String(length=128), nullable=True),
      sa.Column('chunk_size', sa.Integer(), nullable=True),
      sa.Column('workers', sa.Integer(), nullable=True),
      sa.Column('result_destination', sa.String(length=32), nullable=False),
      sa.Column('result_format', sa.String(length=32), nullable=False),
      sa.Column('kafka_broker', sa.String(length=128), nullable=True),
      sa.Column('workflow_name', sa.String(length=40), nullable=False),
      sa.Column('files', sa.Integer(), nullable=True),
      sa.Column('files_skipped', sa.Integer(), nullable=True),
      sa.Column('total_events', sa.BigInteger(), nullable=True),
      sa.Column('total_bytes', sa.BigInteger(), nullable=True),
      sa.Column('did_lookup_time', sa.Integer(), nullable=True),
      sa.Column('generated_code_cm', sa.String(length=128), nullable=True),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('request_id')
      )
      op.create_table('users',
      sa.Column('admin', sa.Boolean(), nullable=True),
      sa.Column('created_at', sa.DateTime(), nullable=True),
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('email', sa.String(length=320), nullable=False),
      sa.Column('full_name', sa.String(length=120), nullable=False),
      sa.Column('institution', sa.String(length=120), nullable=True),
      sa.Column('key', sa.String(length=120), nullable=False),
      sa.Column('pending', sa.Boolean(), nullable=True),
      sa.Column('experiment', sa.String(length=120), nullable=True),
      sa.Column('updated_at', sa.DateTime(), nullable=True),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('email')
      )
      op.create_table('file_status',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('file_id', sa.Integer(), nullable=False),
      sa.Column('request_id', sa.String(length=48), nullable=False),
      sa.Column('status', sa.String(length=128), nullable=False),
      sa.Column('timestamp', sa.DateTime(), nullable=False),
      sa.Column('pod_name', sa.String(length=128), nullable=True),
      sa.Column('info', sa.String(length=10485760), nullable=True),
      sa.ForeignKeyConstraint(['request_id'], ['requests.request_id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('files',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('request_id', sa.String(length=48), nullable=False),
      sa.Column('file_path', sa.String(length=512), nullable=False),
      sa.Column('adler32', sa.String(length=48), nullable=True),
      sa.Column('file_size', sa.BigInteger(), nullable=True),
      sa.Column('file_events', sa.BigInteger(), nullable=True),
      sa.ForeignKeyConstraint(['request_id'], ['requests.request_id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('transform_result',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('did', sa.String(length=512), nullable=False),
      sa.Column('file_id', sa.Integer(), nullable=True),
      sa.Column('file_path', sa.String(length=512), nullable=False),
      sa.Column('request_id', sa.String(length=48), nullable=False),
      sa.Column('transform_status', sa.String(length=120), nullable=False),
      sa.Column('transform_time', sa.Integer(), nullable=True),
      sa.Column('total_events', sa.BigInteger(), nullable=True),
      sa.Column('total_bytes', sa.BigInteger(), nullable=True),
      sa.Column('avg_rate', sa.Float(), nullable=True),
      sa.Column('messages', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['file_id'], ['files.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('transform_result')
      op.drop_table('files')
      op.drop_table('file_status')
      op.drop_table('users')
      op.drop_table('requests')
      # ### end Alembic commands ###
  