mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Refactoring, improve database system and add creation timestamp to homes and warps
This commit is contained in:
1 parent
58eeab20c5
commit
98893814f7
24 files changed
+549
-657
No files matched your search
@@ -48,6 +48,7 @@ public class MySQL extends Database {
|
||||
"`name` varchar(16) NOT NULL," +
|
||||
"`description` varchar(255) NOT NULL," +
|
||||
"`public` boolean NOT NULL," +
|
||||
"`creation_time` timestamp NOT NULL," +
|
||||
"PRIMARY KEY (`player_id`, `name`)," +
|
||||
"FOREIGN KEY (`player_id`) REFERENCES " + HuskHomes.getSettings().getPlayerDataTable() + " (`player_id`) ON DELETE CASCADE ON UPDATE NO ACTION," +
|
||||
"FOREIGN KEY (`location_id`) REFERENCES " + HuskHomes.getSettings().getLocationsDataTable() + " (`location_id`) ON DELETE CASCADE ON UPDATE NO ACTION" +
|
||||
@@ -57,6 +58,7 @@ public class MySQL extends Database {
|
||||
"`location_id` integer NOT NULL," +
|
||||
"`name` varchar(16) NOT NULL UNIQUE," +
|
||||
"`description` varchar(255) NOT NULL," +
|
||||
"`creation_time` timestamp NOT NULL," +
|
||||
"PRIMARY KEY (`location_id`)," +
|
||||
"FOREIGN KEY (`location_id`) REFERENCES " + HuskHomes.getSettings().getLocationsDataTable() + " (`location_id`) ON DELETE CASCADE ON UPDATE NO ACTION" +
|
||||
");"
|
||||
|
||||
Reference in new issue
Block a user