This repository was archived by the owner on Dec 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/org/maxgamer/quickshop Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,10 +114,10 @@ private void checkColumns() {
114114 // Reremake - DataStorage @TODO needs testing
115115 if (plugin .getDatabase ().getCore () instanceof MySQLCore ) {
116116 ps = db .getConnection ().prepareStatement ("ALTER TABLE " + plugin
117- .getDbPrefix () + "shops ADD extra LONGTEXT NOT NULL DEFAULT '{}' " );
117+ .getDbPrefix () + "shops ADD extra LONGTEXT NOT NULL" );
118118 } else {
119119 ps = db .getConnection ().prepareStatement ("ALTER TABLE " + plugin
120- .getDbPrefix () + "shops ADD COLUMN extra TEXT NOT NULL DEFAULT '{}' " );
120+ .getDbPrefix () + "shops ADD COLUMN extra TEXT NOT NULL" );
121121 }
122122 Util .debugLog ("Setting up the column EXTRA..." );
123123 ps .execute ();
Original file line number Diff line number Diff line change @@ -425,6 +425,10 @@ public class ShopDatabaseInfoOrigin {
425425 this .type = rs .getInt ("type" );
426426 this .unlimited = rs .getBoolean ("unlimited" );
427427 this .extra = rs .getString ("extra" );
428+ //handle old shops
429+ if (extra == null ) {
430+ extra = "{}" ;
431+ }
428432 } catch (SQLException sqlex ) {
429433 exceptionHandler (sqlex , null );
430434 }
You can’t perform that action at this time.
0 commit comments