Skip to content

Commit 59d7665

Browse files
authored
Merge pull request #71 from lsst-dm/tickets/DM-49406
DM-49406 Add alembic migration to start LSSTCam
2 parents 8efeb5e + 2ebb6e8 commit 59d7665

File tree

4 files changed

+1615
-9
lines changed

4 files changed

+1615
-9
lines changed

alembic-autogenerate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
print(
3131
"""
3232
Usage:
33-
{sys.argv[0]} put a revision message here")
33+
{sys.argv[0]} put a revision message here
3434
3535
"""
3636
)
@@ -43,7 +43,7 @@
4343

4444
# Loop over each of the instruments
4545
pattern = os.environ["SDM_SCHEMAS_DIR"] + "/yml/cdb_*.yaml"
46-
instruments = ["latiss", "lsstcomcam", "lsstcomcamsim"]
46+
instruments = ["latiss", "lsstcomcam", "lsstcomcamsim", "lsstcam"]
4747
for instrument in instruments:
4848
# Set up a temporary PostgreSQL instance using testing.postgresql
4949
with setup_postgres_test_db() as instance:

alembic/latiss/versions/535c454d7311_add_quicklook.py

+6
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,12 @@ def upgrade() -> None:
577577
existing_nullable=True,
578578
schema="cdb_latiss",
579579
)
580+
581+
# Need to drop and re-create visit1 view before dropping columns
582+
op.execute("DROP VIEW IF EXISTS cdb_latiss.visit1")
583+
op.execute("DROP VIEW IF EXISTS cdb_latiss.ccdvisit1")
584+
op.execute("DROP VIEW IF EXISTS cdb_latiss.exposure_wide_view")
585+
580586
op.drop_column("exposure", "shutter_close_end", schema="cdb_latiss")
581587
op.drop_column("exposure", "shutter_close_begin", schema="cdb_latiss")
582588
op.drop_column("exposure", "shutter_open_begin", schema="cdb_latiss")

0 commit comments

Comments
 (0)