Commit Graph

7 Commits

Author SHA1 Message Date
40fa96777d FEATURE: Post deployment migrations. (#6406)
This moves us away from the delayed drops pattern which
was problematic on two counts. First, it uses a hardcoded "delay for"
duration which may be too short for certain deployment strategies.
Second, delayed drop doesn't ensure that it only runs after
the latest application code has been deployed. If the migration runs
and the application code fails to deploy, running the migration after
"delay for" has been met will cause the application to blow up.

The new strategy allows post deployment migrations to be skipped if the
env `SKIP_POST_DEPLOYMENT_MIGRATIONS` is provided.

```
SKIP_POST_DEPLOYMENT_MIGRATIONS=1 rake db:migrate
-> deploy app servers
SKIP_POST_DEPLOYMENT_MIGRATIONS=0 rake db:migrate
```

To aid with the generation of a post deployment migration, a generator
has been added. Simply run `rails generate post_migration`.
2018-10-08 15:47:38 +08:00
2dfb097dd9 DEV: plugin generator support for spec/test/controller/routes (#6344) 2018-08-30 16:38:25 +02:00
90e67b671b DEV: support for settings/locales in plugin generator (#6341) 2018-08-30 14:12:06 +02:00
d40d241e72 DEV: adds --help --no-help options to plugin generator (#6338)
help will add helpful comments in the various generated files
2018-08-30 12:16:37 +02:00
acc96abe1a DEV: plugin generator will now ask for github username (#6337) 2018-08-30 12:03:30 +02:00
06f18b0e9f typo 2018-08-29 13:51:16 +02:00
ef36fdfb64 DEV: rails generator to create plugin skeleton (#6332)
rails g plugin --help
rails g plugin DiscourseRacoon --author joffrey
2018-08-29 13:32:41 +02:00