Alex 'AdUser' Z
7 years ago
3 changed files with 51 additions and 1 deletions
@ -0,0 +1,9 @@
|
||||
{ |
||||
db => ['dbi:SQLite:dbname=data/data.db'], |
||||
captcha => { |
||||
table => 'captcha', |
||||
tries => 5, |
||||
limit => 500, |
||||
ft_file => '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf' |
||||
}, |
||||
} |
@ -0,0 +1,42 @@
|
||||
BEGIN TRANSACTION; |
||||
|
||||
CREATE TABLE "sites" ( |
||||
"id" INTEGER PRIMARY KEY NOT NULL, |
||||
"site" varchar(4) NOT NULL |
||||
); |
||||
|
||||
CREATE UNIQUE INDEX "sites_uniq" ON "sites" ("site"); |
||||
|
||||
CREATE TABLE "pages" ( |
||||
"id" INTEGER PRIMARY KEY NOT NULL, |
||||
"sid" int(11) NOT NULL, |
||||
"hash" varchar(32) NOT NULL, |
||||
"path" text NULL DEFAULT '', |
||||
FOREIGN KEY ("id") REFERENCES "sites" ("id") |
||||
ON DELETE CASCADE ON UPDATE CASCADE |
||||
); |
||||
|
||||
CREATE UNIQUE INDEX "pages_uniq" ON "pages" ("hash"); |
||||
|
||||
CREATE TABLE "comments" ( |
||||
"id" INTEGER PRIMARY KEY NOT NULL, |
||||
"pid" int(11) NOT NULL, |
||||
"seq" int(11) NOT NULL, |
||||
"name" varchar(255) NOT NULL DEFAULT '', |
||||
"email" varchar(255) NOT NULL DEFAULT '', |
||||
"text" text NOT NULL, |
||||
FOREIGN KEY ("pid") REFERENCES "pages" ("id") |
||||
ON DELETE CASCADE ON UPDATE CASCADE |
||||
); |
||||
|
||||
CREATE UNIQUE INDEX "page_comments" ON "comments" ("pid", "seq"); |
||||
|
||||
CREATE TABLE "captcha" ( |
||||
"id" INTEGER PRIMARY KEY NOT NULL, |
||||
"tries" INTEGER NOT NULL DEFAULT 0, |
||||
"shown" INTEGER NOT NULL DEFAULT 0, |
||||
"code" varchar(16) NOT NULL, |
||||
"data" TEXT NOT NULL |
||||
); |
||||
|
||||
COMMIT; |
Loading…
Reference in new issue