-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add table to keep track of schedule data migrations 1/5 (#7182)
* add secondary index table migration to track schedule data migrations * schema migration stuff * fix sqlite migration
- Loading branch information
Showing
16 changed files
with
1,589 additions
and
7 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
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
4 changes: 4 additions & 0 deletions
4
python_modules/dagster/dagster/core/storage/schedules/migration.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,4 @@ | ||
from typing import Callable, Mapping | ||
|
||
REQUIRED_SCHEDULE_DATA_MIGRATIONS: Mapping[str, Callable] = {} | ||
OPTIONAL_SCHEDULE_DATA_MIGRATIONS: Mapping[str, Callable] = {} |
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
22 changes: 22 additions & 0 deletions
22
...agster/core/storage/schedules/sqlite/alembic/versions/54666da3db5c_add_migration_table.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,22 @@ | ||
"""add migration table | ||
Revision ID: 54666da3db5c | ||
Revises: 0da417ae1b81 | ||
Create Date: 2022-03-23 12:58:43.144576 | ||
""" | ||
from dagster.core.storage.migration.utils import create_schedule_secondary_index_table | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "54666da3db5c" | ||
down_revision = "0da417ae1b81" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
create_schedule_secondary_index_table() | ||
|
||
|
||
def downgrade(): | ||
pass |
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
Binary file added
BIN
+40 KB
...tests/compat_tests/snapshot_0_14_6_schedule_migration_table/sqlite/schedules/schedules.db
Binary file not shown.
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
22 changes: 22 additions & 0 deletions
22
...ibraries/dagster-mysql/dagster_mysql/alembic/versions/d538c9496c01_add_migration_table.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,22 @@ | ||
"""add migration table | ||
Revision ID: d538c9496c01 | ||
Revises: 130b087bc274 | ||
Create Date: 2022-03-23 13:00:19.789472 | ||
""" | ||
from dagster.core.storage.migration.utils import create_schedule_secondary_index_table | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "d538c9496c01" | ||
down_revision = "130b087bc274" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
create_schedule_secondary_index_table() | ||
|
||
|
||
def downgrade(): | ||
pass |
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
22 changes: 22 additions & 0 deletions
22
...es/dagster-postgres/dagster_postgres/alembic/versions/8d66aa722f94_add_migration_table.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,22 @@ | ||
"""add migration table | ||
Revision ID: 8d66aa722f94 | ||
Revises: 9c5f00e80ef2 | ||
Create Date: 2022-03-23 12:59:59.571272 | ||
""" | ||
from dagster.core.storage.migration.utils import create_schedule_secondary_index_table | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "8d66aa722f94" | ||
down_revision = "9c5f00e80ef2" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
create_schedule_secondary_index_table() | ||
|
||
|
||
def downgrade(): | ||
pass |
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
Oops, something went wrong.