Sfoglia il codice sorgente

fix(mysql): fix check if db exists for mysql

tags/v1.0.0
Benjamin Neff 4 anni fa
parent
commit
be7281b97c
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. +4
    -3
      diaspora/install.sls

+ 4
- 3
diaspora/install.sls Vedi File

@@ -169,8 +169,9 @@ diaspora_create_database:
- cwd: {{ diaspora.install_path }}
- onlyif: >-
bash -c 'cd {{ diaspora.install_path }}; RAILS_ENV={{ environment }}
rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rails runner "ActiveRecord::Base.connection"
|& grep "database \"{{ diaspora.database.database }}\" does not exist (ActiveRecord::NoDatabaseError)"'
rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rails runner "ActiveRecord::Base.connection"'
|& grep -E "(Unknown database '{{ diaspora.database.database }}'|database \"{{ diaspora.database.database }}\" does not exist)"
| grep "ActiveRecord::NoDatabaseError"
- env:
- RAILS_ENV: {{ environment }}
- require:
@@ -187,7 +188,7 @@ diaspora_migrate_database:
- cwd: {{ diaspora.install_path }}
- onlyif: >-
bash -c 'cd {{ diaspora.install_path }}; RAILS_ENV={{ environment }}
rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rake db:migrate:status | grep -oE "^\s+down"'
rvm ruby-{{ diaspora.ruby_version }}@diaspora do bin/rake db:migrate:status' | grep -oE "^\s+down"
- env:
- RAILS_ENV: {{ environment }}
- require:

Loading…
Annulla
Salva