Use VARCHAR for mysql, But not sure it works.

Former-commit-id: 290ae3202902797d78cd953913f97f86613dfae7 [formerly 65aedcbfe6c86aebdb249feb8cc4587366572c65]
Former-commit-id: a01e49bc49e56d329917e0ecb493b7c3cea8b160
This commit is contained in:
Ghost_chu committed 2018-11-16 17:53:21 +08:00
1 parent 6f0ffbc7ed
commit 1bca75895e
3 files changed
+10 -3

No files matched your search

@@ -64,7 +64,7 @@ public class DatabaseHelper {
*/
public static void createShopsTable(Database db) throws SQLException {
Statement st = db.getConnection().createStatement();
String createTable = "CREATE TABLE shops (owner TEXT(32) NOT NULL, price double(32, 2) NOT NULL, itemConfig TEXT CHARSET utf8 NOT NULL, x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(32) NOT NULL, unlimited boolean, type boolean, PRIMARY KEY (x, y, z, world) );";
String createTable = "CREATE TABLE shops (owner VARCHAR(32) NOT NULL, price double(32, 2) NOT NULL, itemConfig TEXT CHARSET utf8 NOT NULL, x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(32) NOT NULL, unlimited boolean, type boolean, PRIMARY KEY (x, y, z, world) );";
st.execute(createTable);
}
@@ -76,7 +76,7 @@ public class DatabaseHelper {
*/
public static void createMessagesTable(Database db) throws SQLException {
Statement st = db.getConnection().createStatement();
String createTable = "CREATE TABLE messages (owner TEXT(32) NOT NULL, message TEXT(200) NOT NULL, time BIGINT(32) NOT NULL );";
String createTable = "CREATE TABLE messages (owner VARCHAR(32) NOT NULL, message TEXT(25) NOT NULL, time BIGINT(32) NOT NULL );";
st.execute(createTable);
}
@@ -95,6 +95,13 @@ public class MsgUtil {
Util.parseColours(messages);
selectedVersion = 2;
}
}
public static void saveMessages() {
try {
messages.save(new File(plugin.getDataFolder(), "messages.yml"));
} catch (IOException e) {
}
}
public static void sendControlPanelInfo(CommandSender sender, Shop shop) {