-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.sql.old
More file actions
executable file
·64 lines (59 loc) · 1.44 KB
/
Copy pathdb.sql.old
File metadata and controls
executable file
·64 lines (59 loc) · 1.44 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
everything: created, modified, active, deleted etc. add later
*/
/* add meta to templates */
/* maybe make an "assets" table??*/
drop table templates;
create table templates(
id int not null auto_increment,
primary key(id),
name varchar(255),
created datetime,
modified datetime,
active tinyint(1),
meta_title varchar(70),
meta_desc varchar(400),
location varchar(100),
creator varchar(255), -- simple way to keep track, and eventually could be used for Auth
nextid int,
previd int,
code int,
ip varchar(20)
);
drop table assets;
create table assets(
id char(36) not null,
primary key(id),
name varchar(255),
asset_text text,
filename varchar(255),
filesize int(11),
filemime varchar(45),
template_id int, -- maybe this could be a HABTM, but I think this will make it simpler and is fine
sortorder int,
created datetime,
modified datetime
);
drop table beacons;
create table beacons(
id int not null auto_increment,
primary key(id),
name varchar(255),
created datetime,
modified datetime,
active tinyint(1),
uuid varchar(60),
major int,
minor int,
strength int,
-- relationships
template_id int
);
-- for global settings just proof-of-concept I guess, name could be "top_logo" and value would be "something.jpg"
drop table preferences;
create table preferences(
id int not null auto_increment,
primary key(id),
name varchar(255),
name_value varchar(255)
);