Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ufame
committed
May 22, 2023
1 parent
10bab37
commit 7e4314f
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
CREATE TABLE IF NOT EXISTS `pp_players` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`authid` varchar(36) NOT NULL, | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY (`authid`) | ||
) CHARACTER SET utf8 COLLATE utf8_general_ci; | ||
|
||
CREATE TABLE IF NOT EXISTS `pp_keys` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | ||
`key` varchar(64) NOT NULL, | ||
`default_value` varchar(255) NOT NULL, | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY (`key`) | ||
) CHARACTER SET utf8 COLLATE utf8_general_ci; | ||
|
||
CREATE TABLE IF NOT EXISTS `pp_preferences` ( | ||
`player_id` int(11) NOT NULL, | ||
`key_id` int(11) NOT NULL, | ||
`value` varchar(255) NOT NULL, | ||
PRIMARY KEY (`player_id`, `key_id`), | ||
|
||
FOREIGN KEY (`player_id`) | ||
REFERENCES `pp_players`(`id`) | ||
ON UPDATE CASCADE ON DELETE CASCADE, | ||
|
||
FOREIGN KEY (`key_id`) | ||
REFERENCES `pp_keys`(`id`) | ||
ON UPDATE CASCADE ON DELETE CASCADE | ||
) CHARACTER SET utf8 COLLATE utf8_general_ci; |