feat: Add review events persistence, version display, and auto-versioning system
This commit is contained in:
17
backend/migrations/add_review_events.sql
Normal file
17
backend/migrations/add_review_events.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- Migration: Add review_events table
|
||||
|
||||
CREATE TABLE IF NOT EXISTS review_events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
review_id INTEGER NOT NULL,
|
||||
event_type VARCHAR(50) NOT NULL,
|
||||
step VARCHAR(100),
|
||||
message TEXT,
|
||||
data JSON,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (review_id) REFERENCES reviews(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Create indexes for better performance
|
||||
CREATE INDEX IF NOT EXISTS idx_review_events_review_id ON review_events(review_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_review_events_created_at ON review_events(created_at);
|
||||
|
||||
Reference in New Issue
Block a user