Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block flavor creation until main database is empty
This makes Flavor.create() fail until the main database has had all of its flavors migrated. Since we want to avoid any overlap or clashes in integer ids we need to enforce this. The flavor API was poorly designed in that it exposes this internal id. Luckily, flavor creation is infrequent and flavor migration is fast. The flavors in our database are hard-coded in the first migration, which means we have to basically do the migration during every unit test in order to avoid having a legacy environment. Since that leaves us with deleted flavors in the DB (which screws up the DB archiving tests), this adds a hard_delete flag to the migration to do an actual purge of those from our database. What a mess. Related to blueprint flavor-cell-api Depends-On: I8ab03af9d2f4974f26a7f8487ec978caea957e45 Change-Id: Iea063448f43da1043d16dd521d255dd29a0e1bc5
- Loading branch information
Showing
11 changed files
with
168 additions
and
54 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
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
Oops, something went wrong.