@@ -22,8 +22,8 @@ |
||
22 | 22 | public function boot() |
23 | 23 | { |
24 | 24 | |
25 | - $loader = AliasLoader::getInstance(); |
|
26 | - $loader->alias('DbMigrations', 'Facades\DbMigrations'); |
|
25 | + $loader = AliasLoader::getInstance(); |
|
26 | + $loader->alias('DbMigrations', 'Facades\DbMigrations'); |
|
27 | 27 | |
28 | 28 | |
29 | 29 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ); |
42 | 42 | // Instatiate a new DbMigrations class to send to the handler |
43 | 43 | $this->migrator = $migrator; |
44 | - // Load the alias |
|
44 | + // Load the alias |
|
45 | 45 | $this->loadAlias(); |
46 | 46 | |
47 | 47 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $this->app->register(DbMigrationsServiceProvider::class); |
54 | 54 | // Register the base export handler class |
55 | 55 | $this->registerDbExportHandler(); |
56 | - // Handle the artisan commands |
|
56 | + // Handle the artisan commands |
|
57 | 57 | $this->registerCommands(); |
58 | 58 | } |
59 | 59 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | // when the Artisan application actually starts up and is getting used. |
78 | 78 | $this->commands('db-exporter.migrations', 'db-exporter.seeds', 'db-exporter.backup'); |
79 | 79 | |
80 | - } |
|
80 | + } |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * Register the migrations command |
@@ -3,21 +3,21 @@ |
||
3 | 3 | return array( |
4 | 4 | 'backup' => array( |
5 | 5 | |
6 | - /** |
|
7 | - * The disk where your files will be backed up |
|
8 | - **/ |
|
6 | + /** |
|
7 | + * The disk where your files will be backed up |
|
8 | + **/ |
|
9 | 9 | 'disk' => 'local', |
10 | 10 | |
11 | 11 | |
12 | 12 | /** |
13 | - * Location on disk where to backup migratons |
|
14 | - **/ |
|
13 | + * Location on disk where to backup migratons |
|
14 | + **/ |
|
15 | 15 | 'migrations' => 'backup/migrations/', |
16 | 16 | |
17 | 17 | |
18 | 18 | /** |
19 | - * Location on disk where to backup seeds |
|
20 | - **/ |
|
19 | + * Location on disk where to backup seeds |
|
20 | + **/ |
|
21 | 21 | 'seeds' => 'backup/seeds/' |
22 | 22 | |
23 | 23 | ), |
@@ -105,7 +105,7 @@ |
||
105 | 105 | $del = DIRECTORY_SEPARATOR; |
106 | 106 | $dir =''; |
107 | 107 | $directories = explode($del, $path); |
108 | - foreach ($directories as $key => $directory) { |
|
108 | + foreach ($directories as $key => $directory) { |
|
109 | 109 | if(!empty($directory)) |
110 | 110 | $dir.= $del.$directory; |
111 | 111 | if(!is_dir($dir)) |
@@ -130,18 +130,18 @@ discard block |
||
130 | 130 | |
131 | 131 | $tableIndexes = $this->getTableIndexes($value['table_name']); |
132 | 132 | if (!is_null($tableIndexes) && count($tableIndexes)){ |
133 | - foreach ($tableIndexes as $index) { |
|
133 | + foreach ($tableIndexes as $index) { |
|
134 | 134 | if(Str::endsWith($index['Key_name'], '_index')) { |
135 | - $up .= ' $' . "table->index('" . $index['Column_name'] . "');\n"; |
|
135 | + $up .= ' $' . "table->index('" . $index['Column_name'] . "');\n"; |
|
136 | 136 | } |
137 | 137 | } |
138 | - } |
|
138 | + } |
|
139 | 139 | |
140 | 140 | $up .= " });\n\n"; |
141 | 141 | $Constraint = $ConstraintDown = ""; |
142 | 142 | /** |
143 | - * @var array $tableConstraints |
|
144 | - */ |
|
143 | + * @var array $tableConstraints |
|
144 | + */ |
|
145 | 145 | $tableConstraints = $this->getTableConstraints($value['table_name']); |
146 | 146 | if (!is_null($tableConstraints) && count($tableConstraints)) { |
147 | 147 | $Constraint = $ConstraintDown = " |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | public function columnType($type) |
172 | 172 | { |
173 | - return array_key_exists($type, $columns) ? $this->columns[$type] : ''; |
|
173 | + return array_key_exists($type, $columns) ? $this->columns[$type] : ''; |
|
174 | 174 | } |
175 | 175 | /** |
176 | 176 | * Compile the migration into the base migration file |