Skip to content

Commit

Permalink
Fix Heroku deploys (#654)
Browse files Browse the repository at this point in the history
* Add explicit boolean to integer conversion

* Automatically run migrations

* Add db:populate_sample_data to postdeploy.
  • Loading branch information
cmfcmf authored Jun 5, 2017
1 parent 2f5695c commit dfad08b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
release: bundle exec rake db:migrate
web: bundle exec puma -C config/puma.rb
1 change: 1 addition & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "workshop-portal",
"scripts": {
"postdeploy": "bundle exec rake db:schema:load db:seed db:populate_sample_data"
},
"env": {
"LANG": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class AddDefaultValueToApplicationStatus < ActiveRecord::Migration
def change
change_column :application_letters, :status, :integer, default: 2
change_column :application_letters, :status, 'integer USING CAST(status AS integer)', default: 2
change_column_null :application_letters, :status, false, 2
end
end

0 comments on commit dfad08b

Please sign in to comment.