-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add migrations to fix ccdvisit views.
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
alembic/latiss/versions/adbbeceff286_fix_visit_id_in_ccdvisit_views.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ### |
30 changes: 30 additions & 0 deletions
30
alembic/lsstcomcam/versions/913d10c6ed81_fix_visit_id_in_ccdvisit_views.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ### |
30 changes: 30 additions & 0 deletions
30
alembic/lsstcomcamsim/versions/ab45b3673c90_fix_visit_id_in_ccdvisit_views.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ### |