@@ -159,17 +159,17 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | $tableIndexes = $this->getTableIndexes($value['table_name']); |
| 161 | 161 | if (!is_null($tableIndexes) && count($tableIndexes)){ |
| 162 | - foreach ($tableIndexes as $index) { |
|
| 162 | + foreach ($tableIndexes as $index) { |
|
| 163 | 163 | if(Str::endsWith($index['Key_name'], '_index')) |
| 164 | - $up .= ' $' . "table->index('" . $index['Key_name'] . "');\n"; |
|
| 164 | + $up .= ' $' . "table->index('" . $index['Key_name'] . "');\n"; |
|
| 165 | 165 | } |
| 166 | - } |
|
| 166 | + } |
|
| 167 | 167 | |
| 168 | 168 | $up .= " });\n\n"; |
| 169 | 169 | $Constraint = $ConstraintDown = ""; |
| 170 | 170 | /** |
| 171 | - * @var array $tableConstraints |
|
| 172 | - */ |
|
| 171 | + * @var array $tableConstraints |
|
| 172 | + */ |
|
| 173 | 173 | $tableConstraints = $this->getTableConstraints($value['table_name']); |
| 174 | 174 | if (!is_null($tableConstraints) && count($tableConstraints)){ |
| 175 | 175 | $Constraint = $ConstraintDown = " |
@@ -210,24 +210,24 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | // prevent of failure when no table |
| 212 | 212 | if (!is_null($this->schema) && count($this->schema)) { |
| 213 | - foreach ($this->schema as $name => $values) { |
|
| 214 | - // check again for ignored tables |
|
| 215 | - if (in_array($name, self::$ignore)) { |
|
| 216 | - continue; |
|
| 217 | - } |
|
| 218 | - $upSchema .= " |
|
| 213 | + foreach ($this->schema as $name => $values) { |
|
| 214 | + // check again for ignored tables |
|
| 215 | + if (in_array($name, self::$ignore)) { |
|
| 216 | + continue; |
|
| 217 | + } |
|
| 218 | + $upSchema .= " |
|
| 219 | 219 | /** |
| 220 | 220 | * Table: {$name} |
| 221 | 221 | */ |
| 222 | 222 | {$values['up']}"; |
| 223 | 223 | $upConstraint.=" |
| 224 | 224 | {$values['constraint']}"; |
| 225 | - $downConstraint.=" |
|
| 225 | + $downConstraint.=" |
|
| 226 | 226 | {$values['constraint_down']}"; |
| 227 | 227 | |
| 228 | - $downSchema .= " |
|
| 228 | + $downSchema .= " |
|
| 229 | 229 | {$values['down']}"; |
| 230 | - } |
|
| 230 | + } |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | // Grab the template |