Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

use php console migrations:migrate to install gemini table #9

Merged
merged 5 commits into from
Jun 19, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
crayfish_version_tag: 0.0.8
crayfish_version_tag: master
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make this 0.0.9 as @dannylamb cut a release with the postgresql migrations in it.
https://github.com/Islandora-CLAW/Crayfish/tree/0.0.9


crayfish_services:
- Gemini
Expand Down Expand Up @@ -94,3 +94,7 @@ crayfish_milliner_db_options:
# httpd_conf_directory: /etc/apache2
# crayfish_packages:
# - ImageMagick

php_packages_extra:
- php7.0-mysql
- php7.0-pgsql
13 changes: 0 additions & 13 deletions tasks/db-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,3 @@
password: "{{ crayfish_db_password }}"
state: present
priv: "{{crayfish_db_name}}.*:ALL"

- name: Grab Gemini db schema (mysql)
template:
src: "database/gemini-mysql.sql"
dest: "/tmp/gemini.sql"
when: gemini_db_exists.changed

- name: Install Gemini db schema (mysql)
mysql_db:
state: import
name: all
target: "/tmp/gemini.sql"
when: gemini_db_exists.changed
10 changes: 0 additions & 10 deletions tasks/db-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,3 @@
state: present
owner: "{{ crayfish_db_user }}"
register: gemini_db_exists

- name: Grab Gemini db schema (pgsql)
template:
src: "database/gemini-pgsql.sql"
dest: "/tmp/gemini.sql"
when: gemini_db_exists.changed

- name: Install Gemini db schema (pgsql)
command: psql -d {{ crayfish_db_name }} -f /tmp/gemini.sql
when: gemini_db_exists.changed
11 changes: 11 additions & 0 deletions tasks/gemini.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Gemini composer install
composer:
command: install
working_dir: "{{ crayfish_install_dir }}/Gemini"

- name: Gemini migrate db
shell: php bin/console migrations:migrate
args:
chdir: "{{ crayfish_install_dir }}/Gemini"
5 changes: 5 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@
tags:
- crayfish
- crayfish-install

- include: gemini.yml
tags:
- crayfish
- crayfish-gemini
6 changes: 0 additions & 6 deletions templates/database/gemini-mysql.sql

This file was deleted.

7 changes: 0 additions & 7 deletions templates/database/gemini-pgsql.sql

This file was deleted.