@@ -123,7 +123,6 @@ const definedMigrations: Migration[] = [
|
||||
name: 'Add notes column to connections table',
|
||||
check: async (db: Database): Promise<boolean> => {
|
||||
const notesColumnExists = await columnExists(db, 'connections', 'notes');
|
||||
// Only run if the column does NOT exist
|
||||
return !notesColumnExists;
|
||||
},
|
||||
sql: `
|
||||
@@ -297,6 +296,17 @@ const definedMigrations: Migration[] = [
|
||||
return !jumpChainColumnExists || !proxyTypeColumnExists;
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: 'Add variables column to quick_commands table',
|
||||
check: async (db: Database): Promise<boolean> => {
|
||||
const columnAlreadyExists = await columnExists(db, 'quick_commands', 'variables');
|
||||
return !columnAlreadyExists;
|
||||
},
|
||||
sql: `
|
||||
ALTER TABLE quick_commands ADD COLUMN variables TEXT NULL;
|
||||
`
|
||||
}
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -166,6 +166,7 @@ CREATE TABLE IF NOT EXISTS quick_commands (
|
||||
name TEXT NULL, -- 名称可选
|
||||
command TEXT NOT NULL, -- 指令必选
|
||||
usage_count INTEGER NOT NULL DEFAULT 0, -- 使用频率
|
||||
variables TEXT NULL,
|
||||
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
updated_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user