-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9f0fae
commit e8c71d3
Showing
4 changed files
with
163 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
create table filetype ( | ||
code integer unique primary key not null, | ||
name text unique not null | ||
); | ||
|
||
create table file ( | ||
id integer unique primary key autoincrement not null, | ||
owner integer not null references user (id), | ||
type integer not null references filetype (code), | ||
path text unique not null, | ||
filename text not null, | ||
title text, | ||
description text, | ||
ext text not null, | ||
hashed integer not null, | ||
size real not null, | ||
--new default | ||
deleted integer not null default 0 | ||
); | ||
|
||
create table tier ( | ||
id integer unique primary key not null, | ||
name text unique not null | ||
); | ||
|
||
create table user ( | ||
id integer unique primary key autoincrement not null, | ||
tier integer not null references tier (id), | ||
displayname text not null, | ||
username text unique not null, | ||
mail text not null, | ||
bpasswd text not null | ||
); | ||
|
||
create table avatar ( | ||
user integer not null references user (id), | ||
file integer not null references file (id) | ||
); | ||
|
||
create table metatemplatefile ( | ||
id integer unique primary key autoincrement not null | ||
); | ||
|
||
create table template ( | ||
id integer unique primary key autoincrement not null, | ||
tier integer not null references tier (id), | ||
templatefile integer not null references metatemplatefile(id), | ||
title text not null, | ||
description text not null | ||
); | ||
|
||
create table galleryslot ( | ||
gallery integer not null references gallery (id), | ||
slotid text not null, | ||
res integer references file (id), | ||
title text, | ||
description text | ||
); | ||
|
||
create table gallery ( | ||
id integer unique primary key autoincrement not null, | ||
owner integer not null references user (id), | ||
template integer not null references template (id), | ||
slug text unique not null, | ||
title text, | ||
description text, | ||
--new | ||
deleted integer not null default 0 | ||
); | ||
|
||
|
||
--new table | ||
table gallery_telem ( | ||
id integer unique primary key autoincrement not null, | ||
gallery integer not null references gallery (id), | ||
user integer not null references user (id), | ||
user_agent text not null, | ||
load_time real not null, | ||
used_time real not null default 0 | ||
) | ||
|
||
insert into | ||
filetype | ||
values | ||
(0, 'image'), | ||
(1, 'video'), | ||
(2, 'object3d'); | ||
|
||
insert into | ||
tier | ||
values | ||
(0, 'free'), | ||
(1, 'van gogh'), | ||
(2, 'picasso'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters