Menu

[r509]: / wikipp / trunk / sqlite3.sql  Maximize  Restore  History

Download this file

44 lines (37 with data), 887 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
begin;
drop table if exists history;
drop table if exists pages;
drop table if exists users;
drop table if exists options;
create table options (
lang varchar(16) not null,
name varchar(32) not null,
value text not null,
unique(lang,name)
);
create table users (
id integer primary key autoincrement not null,
username varchar(32) unique not null,
password varchar(32) not null
) ;
create table pages (
id integer primary key autoincrement not null,
lang varchar(16) not null,
slug varchar(128) not null,
title varchar(256) not null,
content text not null,
sidebar text not null,
users_only integer not null,
unique (lang,slug)
);
create table history (
id integer not null,
version integer not null,
created datetime not null,
title varchar(256) not null,
content text not null,
sidebar text not null,
unique(id,version),
primary key(id,version)
);
commit;
MongoDB Logo MongoDB