-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.sql
39 lines (39 loc) · 1.28 KB
/
database.sql
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
CREATE TABLE `wio_struct_networks` (
`id` INT(11) NOT NULL AUTO_INCREMENT ,
`name` VARCHAR(64) NOT NULL ,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
CREATE TABLE `wio_struct_node_types` (
`id` INT(11) NOT NULL AUTO_INCREMENT ,
`network_id` INT(11) NOT NULL ,
`name` VARCHAR(64) NOT NULL ,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
CREATE TABLE `wio_struct_nodes` (
`id` INT(11) NOT NULL AUTO_INCREMENT ,
`node_type_id` INT(11) NOT NULL ,
`name` VARCHAR(64) NOT NULL ,
`lat` FLOAT( 10, 6 ) NOT NULL ,
`lng` FLOAT( 10, 6 ) NOT NULL ,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
CREATE TABLE `wio_struct_links` (
`id` INT(11) NOT NULL AUTO_INCREMENT ,
`node_parent_id` INT(11) NOT NULL ,
`node_children_id` INT(11) NOT NULL ,
`auto_generated` INT(3) NOT NULL ,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
CREATE TABLE `wio_struct_flag_types` (
`id` INT(11) NOT NULL AUTO_INCREMENT ,
`name` VARCHAR(64) NOT NULL ,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
CREATE TABLE `wio_struct_flags` (
`id` INT(11) NOT NULL AUTO_INCREMENT ,
`node_id` INT (11) NOT NULL ,
`flag_type_id` INT(11) NOT NULL ,
`flag_data` VARCHAR(255) NOT NULL ,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
INSERT INTO `wio_struct_networks`(name) VALUES ("administrative");