new_contents: #
  # Copyright (C) 2022 Red Hat, Inc
  #
  # Licensed under the Apache License, Version 2.0 (the "License"); you may
  # not use this file except in compliance with the License. You may obtain
  # a copy of the License at
  #
  # http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  # License for the specific language governing permissions and limitations
  # under the License.
  
  """sync database
  
  Revision ID: 980e18983453
  Revises: 24963e101d13
  Create Date: 2022-02-27 02:35:02.516736
  
  """
  
  # revision identifiers, used by Alembic.
  revision = "980e18983453"
  down_revision = "24963e101d13"
  branch_labels = None
  depends_on = None
  
  from alembic import op
  import sqlalchemy as sa
  from sqlalchemy.dialects import postgresql
  
  
  def upgrade():
      op.alter_column(
          "components", "etag", existing_type=sa.VARCHAR(length=40), nullable=False
      )
      op.alter_column(
          "components", "updated_at", existing_type=postgresql.TIMESTAMP(), nullable=False
      )
  
  
  def downgrade():
      op.alter_column(
          "components", "updated_at", existing_type=postgresql.TIMESTAMP(), nullable=True
      )
      op.alter_column(
          "components", "etag", existing_type=sa.VARCHAR(length=40), nullable=True
      )
  
subject: Set etag and updated_at components fields not nullable