Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-47964: Add migrations to fix ccdvisit views. #63

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 exposure_id")
# ### end Alembic commands ###
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 exposure_id")
# ### end Alembic commands ###
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 exposure_id")
# ### end Alembic commands ###
Loading