@@ -107,32 +107,32 @@ discard block |
||
| 107 | 107 | if ( $table->hasColumn ( $constrant[ "column_name" ] ) ) |
| 108 | 108 | { |
| 109 | 109 | $objConstrant = Constrant::getInstance () |
| 110 | - ->populate ( |
|
| 111 | - array ( |
|
| 112 | - 'constrant' => $constrant[ 'constraint_name' ] , |
|
| 113 | - 'schema' => $constrant[ 'foreign_schema' ] , |
|
| 114 | - 'table' => $constrant[ 'foreign_table' ] , |
|
| 115 | - 'column' => $constrant[ 'foreign_column' ], |
|
| 116 | - 'database' => $this->database |
|
| 117 | - ) |
|
| 118 | - ); |
|
| 110 | + ->populate ( |
|
| 111 | + array ( |
|
| 112 | + 'constrant' => $constrant[ 'constraint_name' ] , |
|
| 113 | + 'schema' => $constrant[ 'foreign_schema' ] , |
|
| 114 | + 'table' => $constrant[ 'foreign_table' ] , |
|
| 115 | + 'column' => $constrant[ 'foreign_column' ], |
|
| 116 | + 'database' => $this->database |
|
| 117 | + ) |
|
| 118 | + ); |
|
| 119 | 119 | |
| 120 | 120 | switch ( $constrant[ 'constraint_type' ] ) |
| 121 | 121 | { |
| 122 | 122 | case "FOREIGN KEY": |
| 123 | 123 | $table->getColumn ( $constrant[ "column_name" ] ) |
| 124 | - ->addRefFk ( $objConstrant ); |
|
| 124 | + ->addRefFk ( $objConstrant ); |
|
| 125 | 125 | break; |
| 126 | 126 | case"PRIMARY KEY": |
| 127 | 127 | $table->getColumn ( $constrant[ "column_name" ] ) |
| 128 | - ->setPrimaryKey ( $objConstrant ) |
|
| 129 | - ->setSequence ( |
|
| 130 | - $this->getSequence ( |
|
| 131 | - $table_name , |
|
| 132 | - $constrant[ "column_name" ], |
|
| 133 | - $schema |
|
| 134 | - ) |
|
| 135 | - ); |
|
| 128 | + ->setPrimaryKey ( $objConstrant ) |
|
| 129 | + ->setSequence ( |
|
| 130 | + $this->getSequence ( |
|
| 131 | + $table_name , |
|
| 132 | + $constrant[ "column_name" ], |
|
| 133 | + $schema |
|
| 134 | + ) |
|
| 135 | + ); |
|
| 136 | 136 | break; |
| 137 | 137 | } |
| 138 | 138 | } |
@@ -152,13 +152,13 @@ discard block |
||
| 152 | 152 | if ( $table->hasColumn ( $constrant[ "foreign_column" ] ) ) |
| 153 | 153 | { |
| 154 | 154 | $table->getColumn ( $constrant[ "foreign_column" ] ) |
| 155 | - ->createDependece ( |
|
| 156 | - $constrant[ 'constraint_name' ] , |
|
| 157 | - $constrant[ 'table_name' ] , |
|
| 158 | - $constrant[ 'column_name' ] , |
|
| 159 | - $this->database, |
|
| 160 | - $constrant[ 'table_schema' ] |
|
| 161 | - ); |
|
| 155 | + ->createDependece ( |
|
| 156 | + $constrant[ 'constraint_name' ] , |
|
| 157 | + $constrant[ 'table_name' ] , |
|
| 158 | + $constrant[ 'column_name' ] , |
|
| 159 | + $this->database, |
|
| 160 | + $constrant[ 'table_schema' ] |
|
| 161 | + ); |
|
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | } |
@@ -193,10 +193,10 @@ discard block |
||
| 193 | 193 | ); |
| 194 | 194 | |
| 195 | 195 | $this->getTable ( $key , $schema ) |
| 196 | - ->addColumn ( $column ) |
|
| 197 | - ->setNamespace ( |
|
| 198 | - $this->config->createClassNamespace ( $this->getTable ( $key , $schema ) ) |
|
| 199 | - ); |
|
| 196 | + ->addColumn ( $column ) |
|
| 197 | + ->setNamespace ( |
|
| 198 | + $this->config->createClassNamespace ( $this->getTable ( $key , $schema ) ) |
|
| 199 | + ); |
|
| 200 | 200 | } |
| 201 | 201 | } |
| 202 | 202 | |
@@ -256,13 +256,13 @@ discard block |
||
| 256 | 256 | public function createTable ( $nameTable , $schema = 0 ) |
| 257 | 257 | { |
| 258 | 258 | $this->objDbTables[ $schema ][ trim ( $nameTable ) ] = DbTable::getInstance () |
| 259 | - ->populate ( |
|
| 260 | - array ( |
|
| 261 | - 'table' => $nameTable , |
|
| 262 | - 'schema' => $schema , |
|
| 263 | - 'database' => $this->database |
|
| 264 | - ) |
|
| 265 | - ); |
|
| 259 | + ->populate ( |
|
| 260 | + array ( |
|
| 261 | + 'table' => $nameTable , |
|
| 262 | + 'schema' => $schema , |
|
| 263 | + 'database' => $this->database |
|
| 264 | + ) |
|
| 265 | + ); |
|
| 266 | 266 | |
| 267 | 267 | return $this; |
| 268 | 268 | } |
@@ -178,15 +178,15 @@ |
||
| 178 | 178 | public function createDependece ( $constraint_name , $table_name , $column_name ,$database, $schema = null ) |
| 179 | 179 | { |
| 180 | 180 | $objConstrantDependence = Constrant::getInstance () |
| 181 | - ->populate ( |
|
| 182 | - array ( |
|
| 183 | - 'constrant' => $constraint_name , |
|
| 184 | - 'schema' => $schema , |
|
| 185 | - 'table' => $table_name , |
|
| 186 | - 'column' => $column_name, |
|
| 187 | - 'database' => $database |
|
| 188 | - ) |
|
| 189 | - ); |
|
| 181 | + ->populate ( |
|
| 182 | + array ( |
|
| 183 | + 'constrant' => $constraint_name , |
|
| 184 | + 'schema' => $schema , |
|
| 185 | + 'table' => $table_name , |
|
| 186 | + 'column' => $column_name, |
|
| 187 | + 'database' => $database |
|
| 188 | + ) |
|
| 189 | + ); |
|
| 190 | 190 | |
| 191 | 191 | $this->addDependece ( $objConstrantDependence ); |
| 192 | 192 | |