1.0
This commit is contained in:
BIN
db/collection_10c1eeb670.db
Normal file
BIN
db/collection_10c1eeb670.db
Normal file
Binary file not shown.
BIN
db/collection_a38a503f6f.db
Normal file
BIN
db/collection_a38a503f6f.db
Normal file
Binary file not shown.
21
db/init.sql
Normal file
21
db/init.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- ArticleCollection插件数据库初始化脚本
|
||||
|
||||
-- 创建合集表
|
||||
CREATE TABLE IF NOT EXISTS plugin_collection (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name TEXT NOT NULL,
|
||||
description TEXT,
|
||||
cover TEXT,
|
||||
related_articles TEXT,
|
||||
sort_order TEXT DEFAULT 'created_desc',
|
||||
is_active INTEGER DEFAULT 1,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- 创建更新时间触发器
|
||||
CREATE TRIGGER IF NOT EXISTS update_collection_time
|
||||
AFTER UPDATE ON plugin_collection
|
||||
BEGIN
|
||||
UPDATE plugin_collection SET updated_at = CURRENT_TIMESTAMP WHERE id = NEW.id;
|
||||
END;
|
||||
Reference in New Issue
Block a user