CREATE TABLE scaffold_pages (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    route_id INTEGER NOT NULL,
    content TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY(route_id) REFERENCES routes(id) ON DELETE CASCADE
);

CREATE TABLE scaffold_params (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    route_id INTEGER NOT NULL,
    query_params JSON,
    url_params JSON,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY(route_id) REFERENCES routes(id) ON DELETE CASCADE
);
