From e55e6638dbbf49a18df8536954fe724c6fea87ae Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sat, 27 Jul 2013 10:16:21 +0300 Subject: [PATCH] column charset --- ipf/orm/datadict/mysql.php | 5 ----- ipf/orm/export.php | 7 +------ ipf/orm/export/mysql.php | 3 +-- ipf/orm/import/schema.php | 1 + 4 files changed, 3 insertions(+), 13 deletions(-) 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', -- 2.49.0