description migration: 0002-add_settings

This commit is contained in:
Ulf Gebhardt 2021-12-21 02:46:23 +01:00
parent e6ae25cd90
commit cdd7d25024
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -1,15 +1,9 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* FIRST MIGRATION
/* MIGRATION TO ADD USER SETTINGS
*
* 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 adds the table `user_setting` in order to store all sorts of user configuration data
*/
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {