You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
526 B
SQL
21 lines
526 B
SQL
PRAGMA foreign_keys = ON;
|
|
|
|
CREATE TABLE IF NOT EXISTS props(
|
|
name TEXT NOT NULL PRIMARY KEY,
|
|
value TEXT
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS namespaces(
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
name BLOB NOT NULL
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS notes(
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
namespace INTEGER,
|
|
category TEXT NOT NULL CHECK(category IN ('account', 'note')),
|
|
title BLOB NOT NULL,
|
|
value BLOB NOT NULL,
|
|
FOREIGN KEY(namespace) REFERENCES namespaces(id)
|
|
);
|