forked from MTSR/mapserver
be38c83fd8
* db cleanup * dev * pg setup * postgres uuid migration * cleanup * fk * sqlite migration * cleanup * wal * max open conns = 1 * fix panic --------- Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
30 lines
718 B
SQL
30 lines
718 B
SQL
create table if not exists objects(
|
|
id integer primary key autoincrement,
|
|
x int,
|
|
y int,
|
|
z int,
|
|
posx int,
|
|
posy int,
|
|
posz int,
|
|
type varchar,
|
|
mtime bigint
|
|
);
|
|
|
|
create index if not exists objects_pos on objects(posx,posy,posz);
|
|
create index if not exists objects_pos_type on objects(posx,posy,posz,type);
|
|
|
|
create table if not exists object_attributes(
|
|
objectid integer not null,
|
|
key varchar not null,
|
|
value varchar not null,
|
|
FOREIGN KEY (objectid) references objects(id) ON DELETE CASCADE
|
|
primary key(objectid, key)
|
|
);
|
|
|
|
create index if not exists object_attributes_key_value on object_attributes(key, value);
|
|
|
|
create table if not exists settings(
|
|
key varchar primary key not null,
|
|
value varchar not null
|
|
);
|