add location-related tables and columns
This commit is contained in:
parent
4e639b8769
commit
3d772d24e7
|
@ -1,6 +1,7 @@
|
||||||
/* local and remote users have profiles */
|
/* local and remote users have profiles */
|
||||||
|
|
||||||
create table profile (
|
create table profile (
|
||||||
|
|
||||||
id integer auto_increment primary key comment 'unique identifier',
|
id integer auto_increment primary key comment 'unique identifier',
|
||||||
nickname varchar(64) not null comment 'nickname or username',
|
nickname varchar(64) not null comment 'nickname or username',
|
||||||
fullname varchar(255) comment 'display name',
|
fullname varchar(255) comment 'display name',
|
||||||
|
@ -8,6 +9,11 @@ create table profile (
|
||||||
homepage varchar(255) comment 'identifying URL',
|
homepage varchar(255) comment 'identifying URL',
|
||||||
bio text comment 'descriptive biography',
|
bio text comment 'descriptive biography',
|
||||||
location varchar(255) comment 'physical location',
|
location varchar(255) comment 'physical location',
|
||||||
|
lat decimal(10,7) comment 'latitude',
|
||||||
|
lon decimal(10,7) comment 'longitude',
|
||||||
|
location_id integer comment 'location id if possible',
|
||||||
|
location_ns integer comment 'namespace for location',
|
||||||
|
|
||||||
created datetime not null comment 'date this record was created',
|
created datetime not null comment 'date this record was created',
|
||||||
modified timestamp comment 'date this record was modified',
|
modified timestamp comment 'date this record was modified',
|
||||||
|
|
||||||
|
@ -119,6 +125,10 @@ create table notice (
|
||||||
is_local tinyint default 0 comment 'notice was generated by a user',
|
is_local tinyint default 0 comment 'notice was generated by a user',
|
||||||
source varchar(32) comment 'source of comment, like "web", "im", or "clientname"',
|
source varchar(32) comment 'source of comment, like "web", "im", or "clientname"',
|
||||||
conversation integer comment 'id of root notice in this conversation' references notice (id),
|
conversation integer comment 'id of root notice in this conversation' references notice (id),
|
||||||
|
lat decimal(10,7) comment 'latitude',
|
||||||
|
lon decimal(10,7) comment 'longitude',
|
||||||
|
location_id integer comment 'location id if possible',
|
||||||
|
location_ns integer comment 'namespace for location',
|
||||||
|
|
||||||
index notice_profile_id_idx (profile_id),
|
index notice_profile_id_idx (profile_id),
|
||||||
index notice_conversation_idx (conversation),
|
index notice_conversation_idx (conversation),
|
||||||
|
@ -556,3 +566,12 @@ create table user_role (
|
||||||
constraint primary key (user_id, role)
|
constraint primary key (user_id, role)
|
||||||
|
|
||||||
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
|
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
|
||||||
|
|
||||||
|
create table location_namespace (
|
||||||
|
|
||||||
|
id integer primary key comment 'identity for this namespace',
|
||||||
|
description varchar(255) comment 'description of the namespace',
|
||||||
|
created datetime not null comment 'date the record was created',
|
||||||
|
modified timestamp comment 'date this record was modified'
|
||||||
|
|
||||||
|
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user