@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | if ( $this->hasTable ( $key , $schema ) ) |
167 | 167 | { |
168 | 168 | $column = $this->getTable ( $key , $schema ) |
169 | - ->getColumn ( $constrant[ "column_name" ] ); |
|
169 | + ->getColumn ( $constrant[ "column_name" ] ); |
|
170 | 170 | if ( $column ) |
171 | 171 | { |
172 | 172 | $objConstrant = new Constrant(); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | if ( $this->hasTable ( $key , $schema ) ) |
209 | 209 | { |
210 | 210 | $column = $this->getTable ( $key , $schema ) |
211 | - ->getColumn ( $constrant[ "foreign_column" ] ); |
|
211 | + ->getColumn ( $constrant[ "foreign_column" ] ); |
|
212 | 212 | |
213 | 213 | if ( $column ) |
214 | 214 | { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | { |
240 | 240 | $pdo = $this->getPDO (); |
241 | 241 | $return1 = $pdo->query ( "SELECT pg_get_serial_sequence('$table', '$column');" ) |
242 | - ->fetchColumn (); |
|
242 | + ->fetchColumn (); |
|
243 | 243 | |
244 | 244 | if ( $return1 ) |
245 | 245 | { |
@@ -294,16 +294,16 @@ discard block |
||
294 | 294 | } |
295 | 295 | |
296 | 296 | $this->getTable ( $key , $schema ) |
297 | - ->createColumn ( $table [ 'column_name' ] ) |
|
298 | - ->getColumn ( $table [ 'column_name' ] ) |
|
299 | - ->populate ( |
|
300 | - array ( |
|
301 | - 'name' => $table [ 'column_name' ] , |
|
302 | - 'type' => $this->convertTypeToPhp ( $table[ 'data_type' ] ) , |
|
303 | - 'nullable' => ( $table[ 'is_nullable' ] == 'YES' ) , |
|
304 | - 'max_length' => $table[ 'max_length' ] |
|
305 | - ) |
|
306 | - ); |
|
297 | + ->createColumn ( $table [ 'column_name' ] ) |
|
298 | + ->getColumn ( $table [ 'column_name' ] ) |
|
299 | + ->populate ( |
|
300 | + array ( |
|
301 | + 'name' => $table [ 'column_name' ] , |
|
302 | + 'type' => $this->convertTypeToPhp ( $table[ 'data_type' ] ) , |
|
303 | + 'nullable' => ( $table[ 'is_nullable' ] == 'YES' ) , |
|
304 | + 'max_length' => $table[ 'max_length' ] |
|
305 | + ) |
|
306 | + ); |
|
307 | 307 | |
308 | 308 | $this->getTable ( $key , $schema )->setNamespace ( |
309 | 309 | $this->config->createClassNamespace ( $this->getTable ( $key , $schema ) ) |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | if ( $this->hasTable ( $key , $schema ) ) |
70 | 70 | { |
71 | 71 | $column = $this->getTable ( $key , $schema ) |
72 | - ->getColumn ( $constrant[ "column_name" ] ); |
|
72 | + ->getColumn ( $constrant[ "column_name" ] ); |
|
73 | 73 | if ( $column ) |
74 | 74 | { |
75 | 75 | $objConstrant = new Constrant(); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | if ( $this->hasTable ( $key , $schema ) ) |
110 | 110 | { |
111 | 111 | $column = $this->getTable ( $key , $schema ) |
112 | - ->getColumn ( $constrant[ "foreign_column" ] ); |
|
112 | + ->getColumn ( $constrant[ "foreign_column" ] ); |
|
113 | 113 | |
114 | 114 | if ( $column ) |
115 | 115 | { |
@@ -151,16 +151,16 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | $this->getTable ( $key , $schema ) |
154 | - ->createColumn ( $table [ 'column_name' ] ) |
|
155 | - ->getColumn ( $table [ 'column_name' ] ) |
|
156 | - ->populate ( |
|
157 | - array ( |
|
158 | - 'name' => $table [ 'column_name' ] , |
|
159 | - 'type' => $this->convertTypeToPhp ( $table[ 'data_type' ] ) , |
|
160 | - 'nullable' => ( $table[ 'is_nullable' ] == 'YES' ) , |
|
161 | - 'max_length' => $table[ 'max_length' ] |
|
162 | - ) |
|
163 | - ); |
|
154 | + ->createColumn ( $table [ 'column_name' ] ) |
|
155 | + ->getColumn ( $table [ 'column_name' ] ) |
|
156 | + ->populate ( |
|
157 | + array ( |
|
158 | + 'name' => $table [ 'column_name' ] , |
|
159 | + 'type' => $this->convertTypeToPhp ( $table[ 'data_type' ] ) , |
|
160 | + 'nullable' => ( $table[ 'is_nullable' ] == 'YES' ) , |
|
161 | + 'max_length' => $table[ 'max_length' ] |
|
162 | + ) |
|
163 | + ); |
|
164 | 164 | |
165 | 165 | $this->getTable ( $key , $schema )->setNamespace ( |
166 | 166 | $this->config->createClassNamespace ( $this->getTable ( $key , $schema ) ) |
@@ -286,8 +286,8 @@ discard block |
||
286 | 286 | public function getSequence ( $table , $column ) |
287 | 287 | { |
288 | 288 | $return = $this->getPDO () |
289 | - ->query ( "select * from information_schema.columns where extra like '%auto_increment%' and TABLE_SCHEMA='{$this->database}' AND TABLE_NAME='{$table}' AND COLUMN_NAME='{$column}';" ) |
|
290 | - ->fetch ( \PDO::FETCH_ASSOC ); |
|
289 | + ->query ( "select * from information_schema.columns where extra like '%auto_increment%' and TABLE_SCHEMA='{$this->database}' AND TABLE_NAME='{$table}' AND COLUMN_NAME='{$column}';" ) |
|
290 | + ->fetch ( \PDO::FETCH_ASSOC ); |
|
291 | 291 | |
292 | 292 | if ( ! $return ) |
293 | 293 | { |