Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Obtain all informations about a column via Column::toArray() #247

Merged
merged 1 commit into from over 1 year ago

4 participants

Martin Hasoň doctrinebot Derek J. Lambert Guilherme Blanco
Martin Hasoň

Replaces #223 ?

doctrinebot
Collaborator

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DBAL-413

Guilherme Blanco guilhermeblanco merged commit 6cda192 into from January 08, 2013
Guilherme Blanco guilhermeblanco closed this January 08, 2013
Derek J. Lambert

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 08, 2013
Martin Hasoň Obtain all informations about a column via Column::toArray() 8791900
This page is out of date. Refresh to see the latest.
16  lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -1193,27 +1193,15 @@ public function getCreateTableSQL(Table $table, $createFlags = self::CREATE_INDE
1193 1193
                 }
1194 1194
             }
1195 1195
 
1196  
-            $columnData = array();
  1196
+            $columnData = $column->toArray();
1197 1197
             $columnData['name'] = $column->getQuotedName($this);
1198  
-            $columnData['type'] = $column->getType();
1199  
-            $columnData['length'] = $column->getLength();
1200  
-            $columnData['notnull'] = $column->getNotNull();
1201  
-            $columnData['fixed'] = $column->getFixed();
1202  
-            $columnData['unique'] = false; // TODO: what do we do about this?
1203 1198
             $columnData['version'] = $column->hasPlatformOption("version") ? $column->getPlatformOption('version') : false;
  1199
+            $columnData['comment'] = $this->getColumnComment($column);
1204 1200
 
1205 1201
             if (strtolower($columnData['type']) == "string" && $columnData['length'] === null) {
1206 1202
                 $columnData['length'] = 255;
1207 1203
             }
1208 1204
 
1209  
-            $columnData['unsigned'] = $column->getUnsigned();
1210  
-            $columnData['precision'] = $column->getPrecision();
1211  
-            $columnData['scale'] = $column->getScale();
1212  
-            $columnData['default'] = $column->getDefault();
1213  
-            $columnData['columnDefinition'] = $column->getColumnDefinition();
1214  
-            $columnData['autoincrement'] = $column->getAutoincrement();
1215  
-            $columnData['comment'] = $this->getColumnComment($column);
1216  
-
1217 1205
             if (in_array($column->getName(), $options['primary'])) {
1218 1206
                 $columnData['primary'] = true;
1219 1207
             }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.