feat: add seeding

This allows us to get a pre-populated database to develop new functionality

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2025-03-14 00:41:36 +01:00 committed by Erik Michelson
parent 539ea7e33b
commit 4790705f0d
No known key found for this signature in database
GPG key ID: DB99ADDDC5C0AF82
9 changed files with 333 additions and 209 deletions

View file

@ -5,7 +5,7 @@
*/
import type { Knex } from 'knex';
/** This is used for the Knex CLI to create migrations during development */
/** This is used for the Knex CLI to create migrations and a seeded database during development */
const config: { [key: string]: Knex.Config } = {
development: {
client: 'better-sqlite3',
@ -15,6 +15,9 @@ const config: { [key: string]: Knex.Config } = {
migrations: {
directory: './src/database/migrations',
},
seeds: {
directory: './src/database/seeds',
},
},
};