-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
---------------- - Add a boolean flag to the dataset table to indicate a particular dataset is stale and should not be used in new transform requests - Take this opportuity to remove the did column from the transform_result table it is never used and is a foreign key
- Loading branch information
1 parent
6c70eba
commit c723331
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
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 @@ | ||
""" | ||
Mark dataset rows as stale | ||
Revision ID: v1_5_5 | ||
Revises: v1_3_0 | ||
Create Date: 2024-11-11 16:06:00.000000 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'v1_5_5' | ||
down_revision = 'v1_3_0' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column('datasets', sa.Column('stale', | ||
sa.Boolean(), | ||
nullable=False, | ||
server_default='false')) | ||
# This was never used, so a fine time to delete it | ||
op.drop_column('transform_result', 'did') | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('datasets', 'stale') | ||
# No need to add the transform_result.did column back in |
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
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