fix: align code with spec

This commit is contained in:
2026-04-03 15:53:48 +02:00
parent 95c97bce33
commit 897577a369
10 changed files with 141 additions and 20 deletions

View File

@@ -5,16 +5,19 @@ use rusqlite::Connection;
/// For M0, this is a stub. Once we have the full schema from the TypeScript
/// app's migrations, we will embed them via refinery.
pub fn run_migrations(conn: &Connection) -> Result<(), Box<dyn std::error::Error>> {
// TODO(M0): Embed real migrations from the TypeScript app's schema.
// TODO(M1): Embed real migrations from the TypeScript app's schema.
// For now, create the minimal tables needed for read-access verification.
conn.execute_batch(
"
CREATE TABLE IF NOT EXISTS projects (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
path TEXT NOT NULL,
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL
slug TEXT NOT NULL,
description TEXT,
data_path TEXT,
is_active INTEGER NOT NULL DEFAULT 0,
created_at INTEGER NOT NULL,
updated_at INTEGER NOT NULL
);
",
)?;