@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function register() |
31 | 31 | { |
32 | - $this->publishes([ |
|
32 | + $this->publishes([ |
|
33 | 33 | realpath(__DIR__ .'/../').'/config/db-exporter.php' => config_path('db-exporter.php'), |
34 | 34 | ]); |
35 | 35 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | realpath(__DIR__ .'/../').'/config/db-exporter.php', 'db-exporter' |
38 | 38 | ); |
39 | 39 | |
40 | - $this->app->register(DbMigrationsServiceProvider::class); |
|
40 | + $this->app->register(DbMigrationsServiceProvider::class); |
|
41 | 41 | |
42 | 42 | // Load the classes |
43 | 43 | $this->loadClasses(); |
@@ -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 |