-
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.
Alembic revisions to merge heads and to prevent failure due to non-un…
…ique article values in oddpub_metrics table. Added podman-compose package to dev for Josh's local testing.
- Loading branch information
1 parent
e2fcd1b
commit 972a22c
Showing
3 changed files
with
60 additions
and
0 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,26 @@ | ||
"""merge heads | ||
Revision ID: b751c4aa2a6e | ||
Revises: 0b2196c1c66b, 600039d1785e | ||
Create Date: 2025-01-30 08:59:15.317385 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = 'b751c4aa2a6e' | ||
down_revision: Union[str, None] = ('0b2196c1c66b', '600039d1785e') | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
pass | ||
|
||
|
||
def downgrade() -> None: | ||
pass |
33 changes: 33 additions & 0 deletions
33
alembic/versions/ea94fafc9590_removing_unique_requirement_from_.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,33 @@ | ||
"""Removing unique requirement from article column in oddpub_metrics table | ||
Revision ID: ea94fafc9590 | ||
Revises: b751c4aa2a6e | ||
Create Date: 2025-01-30 09:01:04.492792 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "ea94fafc9590" | ||
down_revision: Union[str, None] = "b751c4aa2a6e" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.drop_index( | ||
op.f("ix_oddpub_metrics_article"), table_name="oddpub_metrics" | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
|
||
op.create_index( | ||
op.f("ix_oddpub_metrics_article"), | ||
"oddpub_metrics", | ||
["article"], | ||
unique=True, | ||
) |
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