From 48088748df7a2a00a6e39d93804dc29d6b7ebd37 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 17 Apr 2018 00:18:38 +0900 Subject: [PATCH] =?UTF-8?q?schema=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.=20DB=EC=97=90=EC=84=9C=20Exception=20=EC=A0=9C?= =?UTF-8?q?=EB=8C=80=EB=A1=9C=20=EC=95=88=20=EB=8D=98=EC=A7=80=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_install/templates/RootDB.orig.php | 2 ++ hwe/d_setting/DB.orig.php | 2 ++ hwe/sql/schema.sql | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/f_install/templates/RootDB.orig.php b/f_install/templates/RootDB.orig.php index c59ce260..f41fbd15 100644 --- a/f_install/templates/RootDB.orig.php +++ b/f_install/templates/RootDB.orig.php @@ -29,6 +29,8 @@ class RootDB if (self::$uDB === null) { self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding); self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true; + + self::$uDB->error_handler= function(){}; self::$uDB->throw_exception_on_error = true; self::$uDB->throw_exception_on_nonsql_error = true; } diff --git a/hwe/d_setting/DB.orig.php b/hwe/d_setting/DB.orig.php index 71e7fdb3..6ca56027 100644 --- a/hwe/d_setting/DB.orig.php +++ b/hwe/d_setting/DB.orig.php @@ -27,6 +27,8 @@ class DB{ if(self::$uDB === null){ self::$uDB = new \MeekroDB(self::$host,self::$user,self::$password,self::$dbName,self::$port,self::$encoding); self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true; + + self::$uDB->error_handler= function(){}; self::$uDB->throw_exception_on_error = true; self::$uDB->throw_exception_on_nonsql_error = true; } diff --git a/hwe/sql/schema.sql b/hwe/sql/schema.sql index 45cadccf..ae9a5185 100644 --- a/hwe/sql/schema.sql +++ b/hwe/sql/schema.sql @@ -280,8 +280,8 @@ create table nation ( ########################################################################### ## trade 100 이 표준 시세 create table city ( - city int(6) not null auto_increment, - name char(64) not null, + `city` INT(6) NOT NULL AUTO_INCREMENT, + `name` CHAR(64) NOT NULL, level int(1) default 0, upgrading int(1) default 0, nation int(6) default 0, @@ -312,7 +312,7 @@ create table city ( state int(2) default 0, region int(2) default 0, term int(1) default 0, - conflict varchar(500) default '{}' + conflict varchar(500) default '{}', PRIMARY KEY (city), KEY (nation)