diff --git a/alembic/latiss/versions/adbbeceff286_fix_visit_id_in_ccdvisit_views.py b/alembic/latiss/versions/adbbeceff286_fix_visit_id_in_ccdvisit_views.py new file mode 100644 index 00000000..40a8334c --- /dev/null +++ b/alembic/latiss/versions/adbbeceff286_fix_visit_id_in_ccdvisit_views.py @@ -0,0 +1,30 @@ +"""Fix visit_id in ccdvisit views. + +Revision ID: adbbeceff286 +Revises: 47c0b5ce839e +Create Date: 2024-12-05 00:56:52.135839+00:00 + +""" + +from typing import Sequence, Union + +from alembic import op + + +# revision identifiers, used by Alembic. +revision: str = "adbbeceff286" +down_revision: Union[str, None] = "47c0b5ce839e" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.execute("ALTER TABLE cdb_latiss.ccdvisit1 RENAME COLUMN exposure_id TO visit_id") + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.execute("ALTER TABLE cdb_latiss.ccdvisit1 RENAME COLUMN visit_id TO iexposure_id") + # ### end Alembic commands ### diff --git a/alembic/lsstcomcam/versions/913d10c6ed81_fix_visit_id_in_ccdvisit_views.py b/alembic/lsstcomcam/versions/913d10c6ed81_fix_visit_id_in_ccdvisit_views.py new file mode 100644 index 00000000..39a5614e --- /dev/null +++ b/alembic/lsstcomcam/versions/913d10c6ed81_fix_visit_id_in_ccdvisit_views.py @@ -0,0 +1,30 @@ +"""Fix visit_id in ccdvisit views. + +Revision ID: 913d10c6ed81 +Revises: 12f0d22a2347 +Create Date: 2024-12-05 00:56:53.875464+00:00 + +""" + +from typing import Sequence, Union + +from alembic import op + + +# revision identifiers, used by Alembic. +revision: str = "913d10c6ed81" +down_revision: Union[str, None] = "12f0d22a2347" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.execute("ALTER TABLE cdb_latiss.ccdvisit1 RENAME COLUMN exposure_id TO visit_id") + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.execute("ALTER TABLE cdb_latiss.ccdvisit1 RENAME COLUMN visit_id TO iexposure_id") + # ### end Alembic commands ### diff --git a/alembic/lsstcomcamsim/versions/ab45b3673c90_fix_visit_id_in_ccdvisit_views.py b/alembic/lsstcomcamsim/versions/ab45b3673c90_fix_visit_id_in_ccdvisit_views.py new file mode 100644 index 00000000..f2f1f047 --- /dev/null +++ b/alembic/lsstcomcamsim/versions/ab45b3673c90_fix_visit_id_in_ccdvisit_views.py @@ -0,0 +1,30 @@ +"""Fix visit_id in ccdvisit views. + +Revision ID: ab45b3673c90 +Revises: cb09b95e12fb +Create Date: 2024-12-05 00:56:55.551902+00:00 + +""" + +from typing import Sequence, Union + +from alembic import op + + +# revision identifiers, used by Alembic. +revision: str = "ab45b3673c90" +down_revision: Union[str, None] = "cb09b95e12fb" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.execute("ALTER TABLE cdb_latiss.ccdvisit1 RENAME COLUMN exposure_id TO visit_id") + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.execute("ALTER TABLE cdb_latiss.ccdvisit1 RENAME COLUMN visit_id TO iexposure_id") + # ### end Alembic commands ###