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