From af3e211cd50579e5ec1195a4c94e808df2a78093 Mon Sep 17 00:00:00 2001 From: nhertz <nhertz@nrao.edu> Date: Tue, 13 Jul 2021 16:16:27 -0600 Subject: [PATCH] Added `ingested` column to capability requests with the properties: - type: bool - null: not null - default: false --- ...add_ingest_complete_flag_to_capability_.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 schema/versions/0bca0d8b3564_add_ingest_complete_flag_to_capability_.py diff --git a/schema/versions/0bca0d8b3564_add_ingest_complete_flag_to_capability_.py b/schema/versions/0bca0d8b3564_add_ingest_complete_flag_to_capability_.py new file mode 100644 index 000000000..1debf1ecb --- /dev/null +++ b/schema/versions/0bca0d8b3564_add_ingest_complete_flag_to_capability_.py @@ -0,0 +1,23 @@ +"""add ingest-complete flag to capability requests + +Revision ID: 0bca0d8b3564 +Revises: a7c2b4682aae +Create Date: 2021-07-13 16:01:10.908563 + +""" +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision = "0bca0d8b3564" +down_revision = "a7c2b4682aae" +branch_labels = None +depends_on = None + + +def upgrade(): + op.execute("ALTER TABLE capability_requests ADD COLUMN ingested bool NOT NULL DEFAULT false") + + +def downgrade(): + op.execute("ALTER TABLE capability_requests DROP COLUMN IF EXISTS ingested") -- GitLab