Browse Source

add support for map links between points

master
Blaine Motsinger 1 year ago
parent
commit
8be3439162
1 changed files with 16 additions and 2 deletions
  1. 16
    2
      db/schema.sql

+ 16
- 2
db/schema.sql View File

@@ -13,13 +13,27 @@ CREATE TABLE IF NOT EXISTS `user_keys` (
ON DELETE CASCADE
) engine = myisam;

CREATE TABLE IF NOT EXISTS `maps` (
id INT(4) UNSIGNED NOT NULL auto_increment,
name VARCHAR(255) NOT NULL,
description TEXT,
user_id INT(4) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users (id)
ON DELETE CASCADE
) engine = myisam;

CREATE TABLE IF NOT EXISTS `points` (
id INT(4) UNSIGNED NOT NULL auto_increment,
point VARCHAR(255) NOT NULL,
description TEXT NOT NULL,
description TEXT,
user_id INT(4) NOT NULL,
map_id INT(4) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users (id)
ON DELETE CASCADE,
FOREIGN KEY (map_id) REFERENCES maps (id)
ON DELETE CASCADE
) engine = myisam;
) engine = myisam;

Loading…
Cancel
Save