18 lines
529 B
Go
18 lines
529 B
Go
package storage
|
|
|
|
// migration008 — activity_events table for the Сегодня (Today) dashboard.
|
|
const migration008 = `
|
|
CREATE TABLE IF NOT EXISTS activity_events (
|
|
id TEXT PRIMARY KEY,
|
|
node_id TEXT NOT NULL,
|
|
parent_id TEXT,
|
|
event_type TEXT NOT NULL,
|
|
title TEXT NOT NULL DEFAULT '',
|
|
metadata TEXT NOT NULL DEFAULT '{}',
|
|
created_at TEXT NOT NULL
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_ae_created ON activity_events(created_at);
|
|
CREATE INDEX IF NOT EXISTS idx_ae_parent ON activity_events(parent_id);
|
|
`
|