servnest/db/source.sql

33 lines
842 B
SQL

BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "registry" (
"id" INTEGER NOT NULL UNIQUE,
"domain" TEXT,
"username" TEXT,
"last_renewal" INTEGER,
PRIMARY KEY("id" AUTOINCREMENT)
);
CREATE TABLE IF NOT EXISTS "zones" (
"id" INTEGER NOT NULL UNIQUE,
"zone" TEXT NOT NULL,
"username" TEXT NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT)
);
CREATE TABLE IF NOT EXISTS "users" (
"id" INTEGER NOT NULL UNIQUE,
"username" TEXT NOT NULL,
"password" TEXT NOT NULL,
"registration_date" INTEGER NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT)
);
CREATE TABLE IF NOT EXISTS "sites" (
"id" INTEGER NOT NULL UNIQUE,
"username" TEXT NOT NULL,
"site_dir" TEXT NOT NULL,
"domain" TEXT NOT NULL,
"domain_type" TEXT NOT NULL,
"protocol" TEXT NOT NULL,
"creation_date" INTEGER NOT NULL,
"le_enabled" INTEGER,
PRIMARY KEY("id" AUTOINCREMENT)
);
COMMIT;