description migration: 0004-login_server_data

This commit is contained in:
Ulf Gebhardt 2021-12-21 02:42:32 +01:00
parent c42e6f5e96
commit f7459b73ed
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -1,15 +1,15 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* FIRST MIGRATION
/* MIGRATION TO COPY LOGIN_SERVER DATA
*
* This migration is special since it takes into account that
* the database can be setup already but also may not be.
* Therefore you will find all `CREATE TABLE` statements with
* a `IF NOT EXISTS`, all `INSERT` with an `IGNORE` and in the
* downgrade function all `DROP TABLE` with a `IF EXISTS`.
* This ensures compatibility for existing or non-existing
* databases.
* This migration copies all existing data from the `login_server` database (`gradido_login`)
* to the `community_server` database (`gradido_community`) in case the login_server database
* is present.
*
* NOTE: This will fail if the two databases are located on different servers.
* Manual export and import of the database will be required then.
* NOTE: This migration does not delete the data when downgrading!
*/
const LOGIN_SERVER_DB = 'gradido_login'