QR-Generator, Ordner-Sharing, Baustellenschild weg, Button-Fix
This commit is contained in:
@@ -467,4 +467,41 @@ if (!db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='lin
|
||||
}
|
||||
|
||||
|
||||
// ── QR-Codes ──────────────────────────────────────────────────────────────────
|
||||
if (!db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qr_codes'").get()) {
|
||||
db.exec(`
|
||||
CREATE TABLE qr_codes (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
label TEXT NOT NULL DEFAULT '',
|
||||
url TEXT NOT NULL,
|
||||
size INTEGER NOT NULL DEFAULT 256,
|
||||
fg_color TEXT NOT NULL DEFAULT '#000000',
|
||||
bg_color TEXT NOT NULL DEFAULT '#ffffff',
|
||||
margin INTEGER NOT NULL DEFAULT 4,
|
||||
dot_style TEXT NOT NULL DEFAULT 'square',
|
||||
corner_style TEXT NOT NULL DEFAULT 'square',
|
||||
caption TEXT NOT NULL DEFAULT '',
|
||||
caption_pos TEXT NOT NULL DEFAULT 'bottom',
|
||||
caption_color TEXT NOT NULL DEFAULT '#000000',
|
||||
caption_size INTEGER NOT NULL DEFAULT 14,
|
||||
created_at DATETIME DEFAULT NULL
|
||||
)
|
||||
`);
|
||||
}
|
||||
|
||||
// ── Link-Folder Shares ────────────────────────────────────────────────────────
|
||||
if (!db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='link_folder_shares'").get()) {
|
||||
db.exec(`
|
||||
CREATE TABLE link_folder_shares (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
folder_id INTEGER NOT NULL REFERENCES link_list_folders(id) ON DELETE CASCADE,
|
||||
shared_by INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
shared_with INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
created_at DATETIME DEFAULT NULL,
|
||||
UNIQUE(folder_id, shared_with)
|
||||
)
|
||||
`);
|
||||
}
|
||||
|
||||
module.exports = db;
|
||||
|
||||
Reference in New Issue
Block a user