mirror of
https://github.com/chylex/Lightning-Tracker.git
synced 2024-11-24 22:42:50 +01:00
16 lines
414 B
SQL
16 lines
414 B
SQL
CREATE TABLE IF NOT EXISTS `trackers` (
|
|
`id` INT NOT NULL AUTO_INCREMENT,
|
|
`name` VARCHAR(32) NOT NULL,
|
|
`url` VARCHAR(32) NOT NULL,
|
|
`owner_id` INT NOT NULL,
|
|
`hidden` BOOL NOT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY (`url`),
|
|
FOREIGN KEY (`owner_id`)
|
|
REFERENCES `users` (`id`)
|
|
ON UPDATE CASCADE
|
|
ON DELETE RESTRICT
|
|
) ENGINE = InnoDB
|
|
DEFAULT CHARSET = utf8mb4
|
|
COLLATE utf8mb4_general_ci
|