text: """Set modification date on create
  
  Revision ID: 80b8d5e95e9b
  Revises: 54dac710b166
  Create Date: 2021-09-27 09:32:00.323734
  
  """
  from alembic import op
  import sqlalchemy as sa
  from sqlalchemy.dialects import postgresql
  
  # revision identifiers, used by Alembic.
  revision = '80b8d5e95e9b'
  down_revision = '54dac710b166'
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.alter_column('application', 'modified',
                 existing_type=postgresql.TIMESTAMP(),
                 nullable=True)
  
      op.execute("update application set modified = now() where modified is null")
  
      op.alter_column('application', 'modified',
                 existing_type=postgresql.TIMESTAMP(),
                 nullable=False)
  
      op.alter_column('form_process_mapper', 'modified',
                 existing_type=postgresql.TIMESTAMP(),
                 nullable=True)
  
      op.execute("update form_process_mapper set modified = now() where modified is null")
  
      op.alter_column('form_process_mapper', 'modified',
                 existing_type=postgresql.TIMESTAMP(),
                 nullable=False)
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.alter_column('form_process_mapper', 'modified',
                 existing_type=postgresql.TIMESTAMP(),
                 nullable=True)
      op.alter_column('application', 'modified',
                 existing_type=postgresql.TIMESTAMP(),
                 nullable=True)
      # ### end Alembic commands ###
  