Skip to content

Commit

Permalink
Load the schema on deploy on the QA server (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
carolyncole authored Apr 29, 2024
1 parent 2a7dac8 commit 1dc6bc1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,19 @@
end
end

namespace :schema do
desc "Load the current schema"
task :load do
on roles(:schema) do
within release_path do
execute("cd #{release_path} && bundle exec rake schema:create")
end
end
end
end

after "deploy:published", "load_users:from_registration_list"
after "load_users:from_registration_list", "schema:load"

before "deploy:reverted", "npm:install"

Expand Down
2 changes: 1 addition & 1 deletion config/deploy/qa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Defines a single server with a list of roles and multiple properties.
# You can define all roles on a single server, or split them:

server "tigerdata-qa1", user: "deploy", roles: %w[app db web rake]
server "tigerdata-qa1", user: "deploy", roles: %w[app db web rake schema]
server "tigerdata-qa2", user: "deploy", roles: %w[app db web]

0 comments on commit 1dc6bc1

Please sign in to comment.