Skip to content

Commit

Permalink
sort out alembic history
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaellaude committed Oct 9, 2024
1 parent e43cc92 commit a0832d4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
28 changes: 28 additions & 0 deletions backend/app/alembic/versions/09d011c1b387_zones_can_be_null.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""zones_can_be_null
Revision ID: 09d011c1b387
Revises: 8437ce954087
Create Date: 2024-09-09 13:34:59.347083
"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "09d011c1b387"
down_revision: Union[str, None] = "8437ce954087"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
op.execute(sa.text("ALTER TABLE document.assignments ALTER zone DROP NOT NULL"))


def downgrade() -> None:
op.execute(sa.text("DELETE FROM document.assignments WHERE zone IS NULL"))
op.execute(sa.text("ALTER TABLE document.assignments ALTER zone SET NOT NULL"))
4 changes: 2 additions & 2 deletions backend/app/alembic/versions/ccb2a6b81a8b_shattering.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""shattering
Revision ID: ccb2a6b81a8b
Revises: 8437ce954087
Revises: 09d011c1b387
Create Date: 2024-09-13 09:44:34.534198
"""
Expand All @@ -19,7 +19,7 @@

# revision identifiers, used by Alembic.
revision: str = "ccb2a6b81a8b"
down_revision: Union[str, None] = "8437ce954087"
down_revision: Union[str, None] = "09d011c1b387"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

Expand Down

0 comments on commit a0832d4

Please sign in to comment.