text: """empty message
  
  Revision ID: 28da946c5e79
  Revises: 
  Create Date: 2018-04-28 12:18:37.762866
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = '28da946c5e79'
  down_revision = None
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('users',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('username', sa.String(length=1000), nullable=True),
      sa.Column('firstname', sa.String(length=1000), nullable=True),
      sa.Column('lastname', sa.String(length=1000), nullable=True),
      sa.Column('sub', sa.String(length=36), nullable=True),
      sa.Column('iss', sa.String(length=1024), nullable=True),
      sa.Column('creationDate', sa.DateTime(), nullable=True),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('requests',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('timestamp', sa.DateTime(), nullable=True),
      sa.Column('last_update', sa.DateTime(), nullable=True),
      sa.Column('state', sa.String(length=40), nullable=True),
      sa.Column('nr_num', sa.String(length=10), nullable=True),
      sa.Column('admin_comment', sa.String(length=1000), nullable=True),
      sa.Column('applicant', sa.String(length=50), nullable=True),
      sa.Column('phone_number', sa.String(length=30), nullable=True),
      sa.Column('contact', sa.String(length=150), nullable=True),
      sa.Column('ab_partner', sa.String(length=4000), nullable=True),
      sa.Column('sk_partner', sa.String(length=4000), nullable=True),
      sa.Column('consent_flag', sa.String(length=1), nullable=True),
      sa.Column('exam_comment', sa.String(length=4000), nullable=True),
      sa.Column('expiry_date', sa.DateTime(), nullable=True),
      sa.Column('request_id', sa.Integer(), nullable=True),
      sa.Column('request_type_cd', sa.String(length=10), nullable=True),
      sa.Column('priority_cd', sa.String(length=2), nullable=True),
      sa.Column('tilma_ind', sa.String(length=1), nullable=True),
      sa.Column('tilma_transaction_id', sa.Integer(), nullable=True),
      sa.Column('xpro_jurisdiction', sa.String(length=40), nullable=True),
      sa.Column('additional_info', sa.String(length=150), nullable=True),
      sa.Column('nature_business_info', sa.String(length=1000), nullable=True),
      sa.Column('user_note', sa.String(length=1000), nullable=True),
      sa.Column('nuans_num', sa.String(length=20), nullable=True),
      sa.Column('nuans_expiration_date', sa.DateTime(), nullable=True),
      sa.Column('assumed_nuans_num', sa.String(length=20), nullable=True),
      sa.Column('assumed_nuans_name', sa.String(length=255), nullable=True),
      sa.Column('assumed_nuans_expiration_date', sa.DateTime(), nullable=True),
      sa.Column('last_nuans_update_role', sa.String(length=10), nullable=True),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('nr_num')
      )
      op.create_table('events',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('event_dt', sa.DateTime(), nullable=True),
      sa.Column('action', sa.String(length=1000), nullable=True),
      sa.Column('json_zip', sa.String(length=4096), nullable=True),
      sa.Column('nr_id', sa.Integer(), nullable=True),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['nr_id'], ['requests.id'], ),
      sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('names',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('name', sa.String(length=1024), nullable=True),
      sa.Column('state', sa.String(length=15), nullable=True),
      sa.Column('choice', sa.Integer(), nullable=True),
      sa.Column('consumption_date', sa.DateTime(), nullable=True),	
      sa.Column('remote_name_id', sa.BigInteger(), nullable=True),
      sa.Column('nr_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['nr_id'], ['requests.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('names')
      op.drop_table('events')
      op.drop_table('requests')
      op.drop_table('users')
      # ### end Alembic commands ###
  