2022-11-09 14:01:15 +05:30
|
|
|
CREATE TABLE IF NOT EXISTS librepages_sites (
|
|
|
|
site_secret VARCHAR(32) NOT NULL UNIQUE,
|
2022-11-10 16:11:56 +05:30
|
|
|
repo_url VARCHAR(3000) NOT NULL,
|
2022-11-09 14:01:15 +05:30
|
|
|
branch TEXT NOT NULL,
|
|
|
|
hostname VARCHAR(3000) NOT NULL UNIQUE,
|
2022-12-03 16:28:24 +05:30
|
|
|
pub_id uuid NOT NULL UNIQUE,
|
2022-11-09 14:01:15 +05:30
|
|
|
ID SERIAL PRIMARY KEY NOT NULL,
|
2022-12-06 06:29:56 +05:30
|
|
|
deleted BOOLEAN DEFAULT FALSE,
|
2022-11-09 14:01:15 +05:30
|
|
|
owned_by INTEGER NOT NULL references librepages_users(ID) ON DELETE CASCADE
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX librepages_sites_site_secret ON librepages_sites(site_secret);
|
2022-12-03 16:28:24 +05:30
|
|
|
CREATE UNIQUE INDEX librepages_sites_site_pub_id ON librepages_sites(pub_id);
|