test(03-01): add failing tests for setup backend
- Add setups and setupItems tables to DB schema - Add Zod schemas for setup create/update/sync - Add Setup/SetupItem types to shared types - Add setup tables to test helper - Write service and route tests (RED - no implementation yet) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,23 @@ export function createTestDb() {
|
||||
)
|
||||
`);
|
||||
|
||||
sqlite.run(`
|
||||
CREATE TABLE setups (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name TEXT NOT NULL,
|
||||
created_at INTEGER NOT NULL DEFAULT (unixepoch()),
|
||||
updated_at INTEGER NOT NULL DEFAULT (unixepoch())
|
||||
)
|
||||
`);
|
||||
|
||||
sqlite.run(`
|
||||
CREATE TABLE setup_items (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
setup_id INTEGER NOT NULL REFERENCES setups(id) ON DELETE CASCADE,
|
||||
item_id INTEGER NOT NULL REFERENCES items(id) ON DELETE CASCADE
|
||||
)
|
||||
`);
|
||||
|
||||
sqlite.run(`
|
||||
CREATE TABLE settings (
|
||||
key TEXT PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user