· 8 years ago · Aug 09, 2018, 11:00 PM
1drop table if exists entries;
2create table entries (
3 id integer primary key autoincrement,
4 title string not null,
5 text string not null
6);
7
8drop table if exists users;
9create table users (
10 id integer primary key autoincrement,
11 userlvel_id integer not null,
12 alias string not null,
13 pwd string not null,
14 email strong not null,
15 date_joined timestamp not null,
16 last_login timestamp not null,
17 notes string
18);
19
20drop table if exists userlevels;
21create table userlevels (
22 id integer primary key autoincrement,
23 text string not null,
24 time_stamp timestamp not null,
25 notes string
26);
27
28drop table if exists artists;
29create table artists (
30 id integer primary key autoincrement,
31 user_id integer not null,
32 country string not null,
33 time_stamp timestamp not null,
34 notes string
35);
36
37drop table if exists songs;
38create table songs (
39 id integer primary key autoincrement,
40 artist_id integer not null,
41 user_id integer not null,
42 title string not null,
43 time_stamp timestamp,
44 notes string
45);
46
47drop table if exists tabs;
48create table tabs (
49 id integer primary key autoincrement,
50 song_id integer not null,
51 user_id integer not null,
52 text string not null,
53 time_stamp timestamp not null,
54 notes string
55);
56
57drop table if exists votes;
58create table comments (
59 id integer primary key autoincrement,
60 page_id integer not null, -- tab / request / comments
61 record_id integer not null, -- requests record id on the page id
62 user_id integer not null,
63 text string not null,
64 time_stamp timestamp not null,
65 notes string
66);
67
68drop table exists requests;
69create table requests (
70 id integer primary key autoincrement,
71 song_id integer not null,
72 time_stamp timestamp not null,
73 notes string
74);
75
76drop table exists votes;
77create table votes (
78 id integer primary key autoincrement,
79 page_id integer not null,
80 record_id integer not null,
81 user_id integer not null,
82 val integer not null,
83 time_stamp timestamp not null,
84 notes string
85);