mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Fix SQL syntax issue.
This commit is contained in:
parent
2ed5e8e717
commit
0871a96399
@ -2,5 +2,6 @@ package com.gmail.nossr50.datatypes;
|
|||||||
|
|
||||||
public enum DatabaseUpdate {
|
public enum DatabaseUpdate {
|
||||||
FISHING,
|
FISHING,
|
||||||
BLAST_MINING;
|
BLAST_MINING,
|
||||||
|
CASCADE_DELETE;
|
||||||
}
|
}
|
@ -87,7 +87,7 @@ public class Database {
|
|||||||
+ "`user_id` int(10) unsigned NOT NULL,"
|
+ "`user_id` int(10) unsigned NOT NULL,"
|
||||||
+ "`hudtype` varchar(50) NOT NULL DEFAULT 'STANDARD',"
|
+ "`hudtype` varchar(50) NOT NULL DEFAULT 'STANDARD',"
|
||||||
+ "PRIMARY KEY (`user_id`)"
|
+ "PRIMARY KEY (`user_id`)"
|
||||||
+ "FOREIGN KEY (`user_id`) REFERENCES `" + tablePrefix + "users`)"
|
+ "FOREIGN KEY (`user_id`) REFERENCES `" + tablePrefix + "users`"
|
||||||
+ "ON DELETE CASCADE) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
+ "ON DELETE CASCADE) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||||
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "cooldowns` ("
|
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "cooldowns` ("
|
||||||
+ "`user_id` int(10) unsigned NOT NULL,"
|
+ "`user_id` int(10) unsigned NOT NULL,"
|
||||||
@ -104,7 +104,7 @@ public class Database {
|
|||||||
+ "`acrobatics` int(32) unsigned NOT NULL DEFAULT '0',"
|
+ "`acrobatics` int(32) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`blast_mining` int(32) unsigned NOT NULL DEFAULT '0',"
|
+ "`blast_mining` int(32) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "PRIMARY KEY (`user_id`)"
|
+ "PRIMARY KEY (`user_id`)"
|
||||||
+ "FOREIGN KEY (`user_id`) REFERENCES `" + tablePrefix + "users`)"
|
+ "FOREIGN KEY (`user_id`) REFERENCES `" + tablePrefix + "users`"
|
||||||
+ "ON DELETE CASCADE) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
+ "ON DELETE CASCADE) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||||
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "skills` ("
|
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "skills` ("
|
||||||
+ "`user_id` int(10) unsigned NOT NULL,"
|
+ "`user_id` int(10) unsigned NOT NULL,"
|
||||||
@ -120,7 +120,7 @@ public class Database {
|
|||||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "PRIMARY KEY (`user_id`)"
|
+ "PRIMARY KEY (`user_id`)"
|
||||||
+ "FOREIGN KEY (`user_id`) REFERENCES `" + tablePrefix + "users`)"
|
+ "FOREIGN KEY (`user_id`) REFERENCES `" + tablePrefix + "users`"
|
||||||
+ "ON DELETE CASCADE) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
+ "ON DELETE CASCADE) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||||
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "experience` ("
|
write("CREATE TABLE IF NOT EXISTS `" + tablePrefix + "experience` ("
|
||||||
+ "`user_id` int(10) unsigned NOT NULL,"
|
+ "`user_id` int(10) unsigned NOT NULL,"
|
||||||
@ -136,11 +136,12 @@ public class Database {
|
|||||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "PRIMARY KEY (`user_id`)"
|
+ "PRIMARY KEY (`user_id`)"
|
||||||
+ "FOREIGN KEY (`user_id`) REFERENCES `" + tablePrefix + "users`)"
|
+ "FOREIGN KEY (`user_id`) REFERENCES `" + tablePrefix + "users`"
|
||||||
+ "ON DELETE CASCADE) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
+ "ON DELETE CASCADE) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||||
|
|
||||||
checkDatabaseStructure(DatabaseUpdate.FISHING);
|
checkDatabaseStructure(DatabaseUpdate.FISHING);
|
||||||
checkDatabaseStructure(DatabaseUpdate.BLAST_MINING);
|
checkDatabaseStructure(DatabaseUpdate.BLAST_MINING);
|
||||||
|
checkDatabaseStructure(DatabaseUpdate.CASCADE_DELETE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user