]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
column collate
authorAndrey Kutejko <andy128k@gmail.com>
Sat, 27 Jul 2013 07:05:58 +0000 (10:05 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sat, 27 Jul 2013 07:05:58 +0000 (10:05 +0300)
ipf/orm/datadict/mysql.php
ipf/orm/export.php
ipf/orm/export/mysql.php
ipf/orm/import/schema.php

index ddba725bea2e2f995bcc30083ac16d208668b050..cf5620b8220267fd8de1fdc6ae5b125e88f1cc40 100644 (file)
@@ -350,11 +350,6 @@ class IPF_ORM_DataDict_Mysql extends IPF_ORM_DataDict
         return 'CHARACTER SET ' . $charset;
     }
 
-    public function getCollationFieldDeclaration($collation)
-    {
-        return 'COLLATE ' . $collation;
-    }
-
     public function getIntegerDeclaration($name, $field)
     {
         $default = $autoinc = '';
index 005aab60ff18c0fbcf4b400b0f0ce58f7da8b944..6cf51a4db30cac17213f916db8af523e32963452 100644 (file)
@@ -226,8 +226,8 @@ class IPF_ORM_Export extends IPF_ORM_Connection_Module
         $charset   = (isset($field['charset']) && $field['charset']) ?
                     ' ' . $this->getCharsetFieldDeclaration($field['charset']) : '';
 
-        $collation = (isset($field['collation']) && $field['collation']) ?
-                    ' ' . $this->getCollationFieldDeclaration($field['collation']) : '';
+        $collation = (isset($field['collate']) && $field['collate']) ?
+                    ' COLLATE ' . $field['collate'] : '';
 
         $notnull   = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';
 
@@ -409,11 +409,6 @@ class IPF_ORM_Export extends IPF_ORM_Connection_Module
         return '';
     }
 
-    public function getCollationFieldDeclaration($collation)
-    {
-        return '';
-    }
-
     public function exportSortedClassesSql($classes, $groupByConnection = true)
     {
          $connections = array();
index fb90b11ffb3ab5ff97943a1517be4bdcde51500c..b2b26055191ded3f14d452fc70b35ffcb6e449a5 100644 (file)
@@ -121,8 +121,8 @@ class IPF_ORM_Export_Mysql extends IPF_ORM_Export
         $charset   = (isset($field['charset']) && $field['charset']) ?
                     ' ' . $this->getCharsetFieldDeclaration($field['charset']) : '';
 
-        $collation = (isset($field['collation']) && $field['collation']) ?
-                    ' ' . $this->getCollationFieldDeclaration($field['collation']) : '';
+        $collation = (isset($field['collate']) && $field['collate']) ?
+                    ' COLLATE ' . $field['collate'] : '';
 
         $notnull   = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';
 
index 551b9fdf3a1be5e7c3c23793880de6be20d4c123..6a6736e770c66c8809a32ec7c132c06be35c6e15 100644 (file)
@@ -39,6 +39,7 @@ class IPF_ORM_Import_Schema
             'zerofill',
             'owner',
             'exclude',
+            'collate',
         ),
         'relation' => array(
             'key',