60 lines
1.5 KiB
Plaintext
60 lines
1.5 KiB
Plaintext
BEGIN TRANSACTION;
|
|
CREATE TABLE IF NOT EXISTS "users" (
|
|
"id" INTEGER,
|
|
"email" TEXT NOT NULL,
|
|
"pwd" TEXT NOT NULL,
|
|
"dostup" TEXT NOT NULL DEFAULT 'u',
|
|
"activate" INTEGER NOT NULL DEFAULT 1,
|
|
"site" TEXT NOT NULL,
|
|
"json" ,
|
|
PRIMARY KEY("id" AUTOINCREMENT)
|
|
);
|
|
CREATE TABLE IF NOT EXISTS "pages" (
|
|
"id" INTEGER,
|
|
"title" TEXT NOT NULL,
|
|
"txt" TEXT NOT NULL,
|
|
"user_id" INTEGER,
|
|
"status" INTEGER NOT NULL DEFAULT 1,
|
|
"description" TEXT,
|
|
PRIMARY KEY("id" AUTOINCREMENT)
|
|
);
|
|
CREATE TABLE IF NOT EXISTS "content" (
|
|
"id" INTEGER,
|
|
"title" TEXT NOT NULL,
|
|
"txt" TEXT NOT NULL,
|
|
"short_txt" TEXT NOT NULL,
|
|
"user_id" INTEGER,
|
|
"status" INTEGER NOT NULL DEFAULT 1,
|
|
"content_category" INTEGER NOT NULL DEFAULT 0,
|
|
"keywords" TEXT,
|
|
"description" TEXT,
|
|
"site" TEXT,
|
|
"json" TEXT,
|
|
"type" ,
|
|
"alias" ,
|
|
PRIMARY KEY("id" AUTOINCREMENT)
|
|
);
|
|
CREATE TABLE IF NOT EXISTS "content_category" (
|
|
"id" INTEGER,
|
|
"category" INTEGER,
|
|
"title" TEXT NOT NULL,
|
|
"txt" TEXT NOT NULL,
|
|
"user_id" INTEGER,
|
|
"status" INTEGER NOT NULL DEFAULT 1,
|
|
"description" TEXT,
|
|
"keywords" TEXT,
|
|
"site" TEXT,
|
|
"json" TEXT,
|
|
PRIMARY KEY("id" AUTOINCREMENT)
|
|
);
|
|
CREATE TABLE IF NOT EXISTS "settings" (
|
|
"id" INTEGER,
|
|
"json" TEXT NOT NULL,
|
|
"site" TEXT NOT NULL,
|
|
"mod" TEXT NOT NULL,
|
|
PRIMARY KEY("id" AUTOINCREMENT)
|
|
);
|
|
INSERT INTO "users" VALUES (1,'yurec@yurecnt.ru','123','u',1,'localhost','iuhiuhi');
|
|
INSERT INTO "content" VALUES (1,'Первая страница Flask','text страницы','Краткое описание',1,1,0,NULL,NULL,'localhost',NULL,'page',NULL);
|
|
COMMIT;
|