Fail if appservice-discord wants Postgres, but has leftover SQLite data
This commit is contained in:
@ -1,5 +1,21 @@
|
||||
---
|
||||
|
||||
- block:
|
||||
- name: Check if an SQLite database already exists
|
||||
stat:
|
||||
path: "{{ matrix_appservice_discord_data_path }}/{{ matrix_appservice_discord_database_filename_name }}"
|
||||
register: matrix_appservice_discord_stat_sqlite_db
|
||||
|
||||
- name: Fail if an SQLite database already exists when using Postgres
|
||||
fail:
|
||||
msg: >-
|
||||
matrix_appservice_discord_database_engine has been set to `postgres` (which is our new default now).
|
||||
However, we've discovered an existing SQLite database in {{ matrix_appservice_discord_data_path }}/{{ matrix_appservice_discord_database_filename_name }}.
|
||||
It appears that you've been using this bridge with the SQLite engine until now.
|
||||
To continue using SQLite, opt into it explicitly: add `matrix_appservice_discord_database_engine: sqlite` to your vars.yml file.
|
||||
To migrate to Postgres: TODO - migration instructions here.
|
||||
when: "matrix_appservice_discord_database_engine == 'postgres'"
|
||||
|
||||
- name: Ensure Appservice Discord image is pulled
|
||||
docker_image:
|
||||
name: "{{ matrix_appservice_discord_docker_image }}"
|
||||
|
Reference in New Issue
Block a user