feat(knex): initial knexjs migration

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Erik Michelson 2025-03-13 01:29:47 +01:00
parent a9183e82bf
commit b696c1e661
No known key found for this signature in database
GPG key ID: DB99ADDDC5C0AF82
24 changed files with 1066 additions and 185 deletions

21
backend/knexfile.ts Normal file
View file

@ -0,0 +1,21 @@
/*
* SPDX-FileCopyrightText: 2025 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type { Knex } from 'knex';
/** This is used for the Knex CLI to create migrations during development */
const config: { [key: string]: Knex.Config } = {
development: {
client: 'better-sqlite3',
connection: {
filename: './hedgedoc.sqlite',
},
migrations: {
directory: './src/database/migrations',
},
},
};
module.exports = config;