text: """Credential Model.
  
  Revision ID: ecb6f26f44fe
  Revises: faaf1a21674b
  Create Date: 2020-09-09 23:38:44.771480
  
  """
  from alembic import op
  import sqlalchemy as sa
  from sqlalchemy.dialects import postgresql
  
  # revision identifiers, used by Alembic.
  revision = 'ecb6f26f44fe'
  down_revision = 'faaf1a21674b'
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('user')
      op.drop_table('credential')
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('credential',
      sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
      sa.Column('created_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
      sa.Column('updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
      sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=True),
      sa.Column('identity', sa.VARCHAR(), autoincrement=False, nullable=False),
      sa.Column('password', sa.VARCHAR(), autoincrement=False, nullable=True),
      sa.Column('blocked', sa.BOOLEAN(), autoincrement=False, nullable=True),
      sa.Column('note', sa.TEXT(), autoincrement=False, nullable=True),
      sa.ForeignKeyConstraint(['user_id'], ['user.id'], name='credential_user_id_fkey'),
      sa.PrimaryKeyConstraint('id', name='credential_pkey'),
      sa.UniqueConstraint('identity', name='credential_identity_key')
      )
      op.create_table('user',
      sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
      sa.Column('created_by', sa.INTEGER(), autoincrement=False, nullable=False),
      sa.Column('updated_by', sa.INTEGER(), autoincrement=False, nullable=True),
      sa.Column('created_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
      sa.Column('updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
      sa.Column('name', sa.VARCHAR(), autoincrement=False, nullable=False),
      sa.Column('email', sa.VARCHAR(), autoincrement=False, nullable=False),
      sa.Column('pnum', sa.VARCHAR(length=13), autoincrement=False, nullable=True),
      sa.PrimaryKeyConstraint('id', name='user_pkey'),
      sa.UniqueConstraint('email', name='user_email_key'),
      sa.UniqueConstraint('pnum', name='user_pnum_key')
      )
      # ### end Alembic commands ###
  