-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move db migration to postgres stop-command
- Loading branch information
1 parent
7f0b474
commit 09e39df
Showing
7 changed files
with
40 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash -e | ||
|
||
. "$SNAP/mastodon.env" | ||
|
||
if [ "$(snapctl get migration-required)" == true ]; then | ||
postgres_waitready | ||
mastodon_rails db:migrate | ||
mastodon_rails log:clear tmp:clear | ||
reset_migration_required | ||
reset_pre_migration_required | ||
elif [ "$(snapctl get pre-migration-required)" == true ]; then | ||
postgres_waitready | ||
SKIP_POST_DEPLOYMENT_MIGRATIONS=true \ | ||
mastodon_rails db:migrate | ||
mastodon_rails log:clear tmp:clear | ||
reset_pre_migration_required | ||
fi | ||
|
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
Empty file.