add home page

This commit is contained in:
Bill Yang 2025-02-15 22:37:07 -08:00
parent 0dc058749d
commit a3978f17c4
11 changed files with 346 additions and 16 deletions

View file

@ -59,6 +59,17 @@ export async function initializePostgres() {
referrer TEXT
);
`,
sql`
CREATE TABLE IF NOT EXISTS sites (
site_id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
domain TEXT NOT NULL UNIQUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
created_by TEXT NOT NULL REFERENCES "user" ("id")
);
`,
]);
// Phase 2: Create tables with foreign key dependencies