Files
apex/server/db/migrations/007_suppliers.sql
T
lejayandCursor 6c0d7e47b8 v2.0
Co-authored-by: Cursor <[email protected]>
2026-05-28 07:20:38 +02:00

17 lines
612 B
SQL

-- Migration 007: Suppliers table for order voucher emails
CREATE TABLE IF NOT EXISTS suppliers (
id INTEGER PRIMARY KEY AUTOINCREMENT,
code TEXT UNIQUE NOT NULL,
name TEXT NOT NULL,
email TEXT NOT NULL,
type TEXT NOT NULL, -- 'panels', 'hardware', 'handles', 'other'
active INTEGER DEFAULT 1,
created_at TEXT DEFAULT (datetime('now'))
);
-- Seed default suppliers
INSERT OR IGNORE INTO suppliers (code, name, email, type) VALUES
('formex', 'Formex', '[email protected]', 'panels'),
('blum', 'Blum Switzerland', '[email protected]', 'hardware');