-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow migrations to be hardcoded as fake
- Loading branch information
1 parent
d91d59c
commit 4f82908
Showing
6 changed files
with
82 additions
and
9 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
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
20 changes: 20 additions & 0 deletions
20
tests/example_apps/music/piccolo_migrations/music_2024_06_19t18_11_05_793132.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,20 @@ | ||
from piccolo.apps.migrations.auto.migration_manager import MigrationManager | ||
|
||
ID = "2024-06-19T18:11:05:793132" | ||
VERSION = "1.11.0" | ||
DESCRIPTION = "An example fake migration" | ||
|
||
|
||
async def forwards(): | ||
manager = MigrationManager( | ||
migration_id=ID, app_name="", description=DESCRIPTION, fake=True | ||
) | ||
|
||
def run(): | ||
# This should never run, as this migrations is `fake=True`. It's here | ||
# for testing purposes (to make sure it never gets triggered). | ||
print("Running fake migration") | ||
|
||
manager.add_raw(run) | ||
|
||
return manager |