Skip to content

Commit

Permalink
adds delete col and creates new migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Sep 9, 2021
1 parent 8cefd18 commit 160a4ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""restores temporary projects_snapshots table
Revision ID: 6c9016456ff1
Revision ID: a2a020b67bd2
Revises: 0208f6b32f32
Create Date: 2021-09-09 16:11:27.608922+00:00
Create Date: 2021-09-09 16:49:57.696337+00:00
"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "6c9016456ff1"
revision = "a2a020b67bd2"
down_revision = "0208f6b32f32"
branch_labels = None
depends_on = None
Expand All @@ -24,6 +24,7 @@ def upgrade():
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.Column("parent_uuid", sa.String(), nullable=False),
sa.Column("project_uuid", sa.String(), nullable=False),
sa.Column("deleted", sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(
["parent_uuid"],
["projects.uuid"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
unique=True,
doc="UUID of the project associated to this snapshot",
),
sa.Column("deleted", sa.Boolean(), default=False),
sa.UniqueConstraint(
"parent_uuid", "created_at", name="snapshot_from_project_uniqueness"
),
Expand Down

0 comments on commit 160a4ff

Please sign in to comment.