-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 108-extract-document-text
- Loading branch information
Showing
6 changed files
with
115 additions
and
40 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
35 changes: 35 additions & 0 deletions
35
nesis/api/alembic/versions/50bebf15de30_add_tasks_to_role_action_resource_type.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,35 @@ | ||
"""add tasks to role_action_resource_type | ||
Revision ID: 50bebf15de30 | ||
Revises: 3d6d802ca102 | ||
Create Date: 2024-06-13 23:41:54.517558 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "50bebf15de30" | ||
down_revision: Union[str, None] = "3d6d802ca102" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.execute("ALTER TYPE role_action_resource_type ADD VALUE 'APPS';") | ||
op.execute("ALTER TYPE role_action_resource_type ADD VALUE 'TASKS';") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
""" | ||
We keep the APPS and TASKS types as might be used by the application | ||
""" | ||
pass | ||
# ### end Alembic commands ### |
35 changes: 35 additions & 0 deletions
35
nesis/api/alembic/versions/cbad6afbe13d_add_parent_id_to_task_unique_constraint.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,35 @@ | ||
"""add parent_id to task unique constraint | ||
Revision ID: cbad6afbe13d | ||
Revises: 50bebf15de30 | ||
Create Date: 2024-06-13 23:59:45.211996 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "cbad6afbe13d" | ||
down_revision: Union[str, None] = "50bebf15de30" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint("uq_task_type_schedule", "task", type_="unique") | ||
op.create_unique_constraint( | ||
"uq_task_parent_id_type_schedule", "task", ["parent_id", "type", "schedule"] | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint("uq_task_parent_id_type_schedule", "task", type_="unique") | ||
op.create_unique_constraint("uq_task_type_schedule", "task", ["type", "schedule"]) | ||
# ### end Alembic commands ### |
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
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