-
Notifications
You must be signed in to change notification settings - Fork 0
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-48437: Add migration script for schema 5.0.0 #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We also need to add a short description to doc/lsst.dax.apdb_migrate/migrations/sql/schema.rst
.
def upgrade() -> None: | ||
"""Upgrade 'schema' tree from 4.0.0 to 5.0.0 (ticket DM-48437). | ||
Summary of changes: | ||
- Add empty dipoleFitAttempted column. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add empty dipoleFitAttempted column. | |
- Add empty is_negative column. |
def downgrade() -> None: | ||
"""Downgrade 'schema' tree from 5.0.0 to 4.0.0 (ticket DM-48437). | ||
Summary of changes: | ||
- Remove empty dipoleFitAttempted column. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Remove empty dipoleFitAttempted column. | |
- Remove empty is_negative column. |
ctx = Context() | ||
|
||
# Alter table schema. | ||
_LOG.info("Dropping column to DiaSource table.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_LOG.info("Dropping column to DiaSource table.") | |
_LOG.info("Dropping column from DiaSource table.") |
6f28add
to
ed1a170
Compare
d2e1dca
to
de71f60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
No description provided.