refactor (v2): better arch
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- Add note_versions table
|
||||
CREATE TABLE note_versions (
|
||||
id TEXT PRIMARY KEY,
|
||||
note_id TEXT NOT NULL,
|
||||
title TEXT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
created_at TEXT NOT NULL,
|
||||
FOREIGN KEY(note_id) REFERENCES notes(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX idx_note_versions_note_id ON note_versions(note_id);
|
||||
Reference in New Issue
Block a user