Skip to content

Commit 6cd4df8

Browse files
committed
add PRIMARY KEY
1 parent 0861852 commit 6cd4df8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/maxgamer/quickshop/database/DatabaseHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private void createLogsTable() {
110110

111111
private void createExternalCacheTable() {
112112
String createTable = "CREATE TABLE " + plugin.getDbPrefix()
113-
+ "external_cache ( x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(32) NOT NULL );";
113+
+ "external_cache ( x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(32) NOT NULL ) PRIMARY KEY (x, y, z, world);";
114114
manager.runInstantTask(new DatabaseTask(createTable));
115115
createColumn("external_cache", "space", new DataType(DataTypeMapping.INT, null));
116116
createColumn("external_cache", "stock", new DataType(DataTypeMapping.INT, null));

0 commit comments

Comments
 (0)