trilium/migrations/0014__change_audit_log_id.sql
2017-10-26 21:53:26 -04:00

16 lines
No EOL
493 B
SQL

CREATE TABLE `audit_log_mig` (
`id` TEXT NOT NULL PRIMARY KEY,
`date_modified` INTEGER NOT NULL,
`category` TEXT NOT NULL,
`browser_id` TEXT,
`note_id` TEXT,
`change_from` TEXT,
`change_to` TEXT,
`comment` TEXT
);
INSERT INTO audit_log_mig (id, date_modified, category, browser_id, note_id, change_from, change_to)
SELECT id, date_modified, category, browser_id, note_id, change_from, change_to FROM audit_log;
DROP TABLE audit_log;
ALTER TABLE audit_log_mig RENAME TO audit_log;