feat: 添加连接备注功能
This commit is contained in:
@@ -107,6 +107,20 @@ const definedMigrations: Migration[] = [
|
||||
);
|
||||
`
|
||||
}
|
||||
,
|
||||
{
|
||||
id: 4,
|
||||
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: `
|
||||
-- Add the notes column to the connections table, allowing NULL values
|
||||
ALTER TABLE connections ADD COLUMN notes TEXT NULL;
|
||||
`
|
||||
},
|
||||
// --- 未来可以添加更多迁移 ---
|
||||
];
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ CREATE TABLE IF NOT EXISTS connections (
|
||||
encrypted_passphrase TEXT NULL,
|
||||
proxy_id INTEGER NULL,
|
||||
ssh_key_id INTEGER NULL, -- 新增 ssh_key_id 列
|
||||
notes TEXT NULL,
|
||||
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
updated_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
last_connected_at INTEGER NULL,
|
||||
|
||||
Reference in New Issue
Block a user