Automatic creation of Admin user (TEST)

This commit is contained in:
rudi committed 2026-07-30 11:57:35 +02:00
1 parent 4ccd860814
commit d395308c6d
2 files changed
+13 -37

No files matched your search

-20
View File
@@ -1,26 +1,6 @@
import { prisma } from "@/lib/db/prisma";
db.exec(`
CREATE TABLE IF NOT EXISTS songs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS songbooks (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
language TEXT
);
CREATE TABLE IF NOT EXISTS songbook_songs (
songbook_id INTEGER,
song_id INTEGER,
song_number TEXT,
PRIMARY KEY (songbook_id, song_id),
FOREIGN KEY (songbook_id) REFERENCES songbooks(id) ON DELETE CASCADE,
FOREIGN KEY (song_id) REFERENCES songs(id) ON DELETE CASCADE
);
`)
export async function getSongs() {
try {
const songs = db.prepare(`