From: Andrey Kutejko Date: Sat, 27 Jul 2013 07:16:21 +0000 (+0300) Subject: column charset X-Git-Tag: 0.6~72 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=e55e6638dbbf49a18df8536954fe724c6fea87ae;p=ipf-legacy-orm.git column charset --- diff --git a/ipf/orm/datadict/mysql.php b/ipf/orm/datadict/mysql.php index cf5620b..ac55770 100644 --- a/ipf/orm/datadict/mysql.php +++ b/ipf/orm/datadict/mysql.php @@ -345,11 +345,6 @@ class IPF_ORM_DataDict_Mysql extends IPF_ORM_DataDict } } - public function getCharsetFieldDeclaration($charset) - { - return 'CHARACTER SET ' . $charset; - } - public function getIntegerDeclaration($name, $field) { $default = $autoinc = ''; diff --git a/ipf/orm/export.php b/ipf/orm/export.php index 6cf51a4..ecca7b5 100644 --- a/ipf/orm/export.php +++ b/ipf/orm/export.php @@ -224,7 +224,7 @@ class IPF_ORM_Export extends IPF_ORM_Connection_Module $default = $this->getDefaultFieldDeclaration($field); $charset = (isset($field['charset']) && $field['charset']) ? - ' ' . $this->getCharsetFieldDeclaration($field['charset']) : ''; + ' CHARACTER SET ' . $field['charset'] : ''; $collation = (isset($field['collate']) && $field['collate']) ? ' COLLATE ' . $field['collate'] : ''; @@ -404,11 +404,6 @@ class IPF_ORM_Export extends IPF_ORM_Connection_Module return 'UNIQUE'; } - public function getCharsetFieldDeclaration($charset) - { - return ''; - } - public function exportSortedClassesSql($classes, $groupByConnection = true) { $connections = array(); diff --git a/ipf/orm/export/mysql.php b/ipf/orm/export/mysql.php index b2b2605..ef9c16e 100644 --- a/ipf/orm/export/mysql.php +++ b/ipf/orm/export/mysql.php @@ -115,11 +115,10 @@ class IPF_ORM_Export_Mysql extends IPF_ORM_Export public function getDeclaration($name, array $field) { - $default = $this->getDefaultFieldDeclaration($field); $charset = (isset($field['charset']) && $field['charset']) ? - ' ' . $this->getCharsetFieldDeclaration($field['charset']) : ''; + ' CHARACTER SET ' . $field['charset'] : ''; $collation = (isset($field['collate']) && $field['collate']) ? ' COLLATE ' . $field['collate'] : ''; diff --git a/ipf/orm/import/schema.php b/ipf/orm/import/schema.php index 6a6736e..3f7e073 100644 --- a/ipf/orm/import/schema.php +++ b/ipf/orm/import/schema.php @@ -40,6 +40,7 @@ class IPF_ORM_Import_Schema 'owner', 'exclude', 'collate', + 'charset', ), 'relation' => array( 'key',