19 lines
860 B
SQL
19 lines
860 B
SQL
-- Migration: Add Settings Table
|
|
-- Description: Creates settings table for application configuration (date format, currency, number format)
|
|
|
|
CREATE TABLE IF NOT EXISTS "settings" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"key" TEXT NOT NULL UNIQUE,
|
|
"value" TEXT NOT NULL,
|
|
"description" TEXT,
|
|
"createdDate" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"updateDate" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
-- Insert default settings
|
|
INSERT OR IGNORE INTO "settings" ("key", "value", "description") VALUES
|
|
('dateFormat', 'ar-SA', 'Date format locale (ar-SA or en-US)'),
|
|
('currency', 'JOD', 'Currency code (JOD, USD, EUR, etc.)'),
|
|
('numberFormat', 'ar-SA', 'Number format locale (ar-SA or en-US)'),
|
|
('currencySymbol', 'د.أ', 'Currency symbol display'),
|
|
('dateDisplayFormat', 'dd/MM/yyyy', 'Date display format pattern'); |