Parcourir la source

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

tags/v1.0.0
Benjamin Neff il y a 4 ans
Parent
révision
be7281b97c
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. +4
    -3
      diaspora/install.sls

+ 4
- 3
diaspora/install.sls Voir le fichier

@@ -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:

Chargement…
Annuler
Enregistrer