Lightweight Database Schema Setup for Mobile and Apps in SQLite
- Category SQL
- Type Query
- Platform Cross-platform
- Language SQL
- Price Free
- Copy 25 419
- Comments 0
Lightweight Database Schema Setup for Mobile and Apps in SQLite
-- Enable foreign key support explicitly in SQLite configuration
PRAGMA foreign_keys = ON;
-- Create a lightweight local settings table
CREATE TABLE application_settings (
setting_id INTEGER PRIMARY KEY AUTOINCREMENT,
theme_mode TEXT DEFAULT 'dark',
auto_sync INTEGER CHECK(auto_sync IN (0, 1)) DEFAULT 1,
last_backup_date TEXT
);
-- Quick data seeding command for local testing
INSERT INTO application_settings (theme_mode, auto_sync) VALUES ('dark', 1);
Free snippet — copy & paste!
Copy this snippet for free on Clayi Code. One click — no account required.

There are no comments yet :(