@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | 'backup' => [ |
5 | - /* |
|
5 | + /* |
|
6 | 6 | * The disk where your files will be backed up |
7 | 7 | **/ |
8 | 8 | 'disk' => 'local', |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | // Symfony style block messages |
38 | 38 | $formatter = $this->getHelperSet()->get('formatter'); |
39 | 39 | $errorMessages = [ |
40 | - $title, |
|
41 | - $message, |
|
42 | - ]; |
|
40 | + $title, |
|
41 | + $message, |
|
42 | + ]; |
|
43 | 43 | $formattedBlock = $formatter->formatBlock($errorMessages, $style, true); |
44 | 44 | $this->line($formattedBlock); |
45 | 45 | } |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | { |
63 | 63 | return [ |
64 | 64 | [ |
65 | - 'database', |
|
66 | - InputArgument::OPTIONAL, |
|
67 | - 'Override the application database', |
|
65 | + 'database', |
|
66 | + InputArgument::OPTIONAL, |
|
67 | + 'Override the application database', |
|
68 | 68 | ], |
69 | - ]; |
|
69 | + ]; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | //end getArguments() |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | { |
76 | 76 | return [ |
77 | 77 | [ |
78 | - 'ignore', |
|
79 | - 'i', |
|
80 | - InputOption::VALUE_REQUIRED, |
|
81 | - 'Ignore tables to export, seperated by a comma', |
|
82 | - null, |
|
78 | + 'ignore', |
|
79 | + 'i', |
|
80 | + InputOption::VALUE_REQUIRED, |
|
81 | + 'Ignore tables to export, seperated by a comma', |
|
82 | + null, |
|
83 | 83 | ], |
84 | - ]; |
|
84 | + ]; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | //end getOptions() |
@@ -15,25 +15,25 @@ discard block |
||
15 | 15 | * @var string |
16 | 16 | **/ |
17 | 17 | protected $columns = [ |
18 | - 'int' => 'integer', |
|
19 | - 'smallint' => 'smallInteger', |
|
20 | - 'bigint' => 'bigInteger', |
|
21 | - 'char ' => 'string', |
|
22 | - 'varchar' => 'string', |
|
23 | - 'float' => 'float', |
|
24 | - 'double' => 'double', |
|
25 | - 'decimal' => 'decimal', |
|
26 | - 'tinyint' => 'boolean', |
|
27 | - 'date' => 'date', |
|
28 | - 'timestamp' => 'timestamp', |
|
29 | - 'datetime' => 'dateTime', |
|
30 | - 'longtext' => 'longText', |
|
31 | - 'mediumtext' => 'mediumText', |
|
32 | - 'text' => 'text', |
|
33 | - 'longblob' => 'binary', |
|
34 | - 'blob' => 'binary', |
|
35 | - 'enum' => 'enum', |
|
36 | - ]; |
|
18 | + 'int' => 'integer', |
|
19 | + 'smallint' => 'smallInteger', |
|
20 | + 'bigint' => 'bigInteger', |
|
21 | + 'char ' => 'string', |
|
22 | + 'varchar' => 'string', |
|
23 | + 'float' => 'float', |
|
24 | + 'double' => 'double', |
|
25 | + 'decimal' => 'decimal', |
|
26 | + 'tinyint' => 'boolean', |
|
27 | + 'date' => 'date', |
|
28 | + 'timestamp' => 'timestamp', |
|
29 | + 'datetime' => 'dateTime', |
|
30 | + 'longtext' => 'longText', |
|
31 | + 'mediumtext' => 'mediumText', |
|
32 | + 'text' => 'text', |
|
33 | + 'longblob' => 'binary', |
|
34 | + 'blob' => 'binary', |
|
35 | + 'enum' => 'enum', |
|
36 | + ]; |
|
37 | 37 | /** |
38 | 38 | * Primary key column types. |
39 | 39 | * |
@@ -185,11 +185,11 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | $this->schema[$value['table_name']] = [ |
188 | - 'up' => $up, |
|
189 | - 'constraint' => $Constraint, |
|
190 | - 'constraint_down' => $ConstraintDown, |
|
191 | - 'down' => $down, |
|
192 | - ]; |
|
188 | + 'up' => $up, |
|
189 | + 'constraint' => $Constraint, |
|
190 | + 'constraint_down' => $ConstraintDown, |
|
191 | + 'down' => $down, |
|
192 | + ]; |
|
193 | 193 | }//end foreach |
194 | 194 | |
195 | 195 | return $this; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | $this->publishes( |
35 | 35 | [ |
36 | - realpath(__DIR__ . '/../') . '/config/db-exporter.php' => config_path('db-exporter.php'), |
|
36 | + realpath(__DIR__ . '/../') . '/config/db-exporter.php' => config_path('db-exporter.php'), |
|
37 | 37 | ], |
38 | 38 | 'config' |
39 | 39 | ); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | ); |
45 | 45 | // Instatiate a new DbMigrations class to send to the handler |
46 | 46 | $this->migrator = $migrator; |
47 | - // Load the alias |
|
47 | + // Load the alias |
|
48 | 48 | $this->loadAlias(); |
49 | 49 | } |
50 | 50 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $this->app->register(DbMigrationsServiceProvider::class); |
56 | 56 | // Register the base export handler class |
57 | 57 | $this->registerDbExportHandler(); |
58 | - // Handle the artisan commands |
|
58 | + // Handle the artisan commands |
|
59 | 59 | $this->registerCommands(); |
60 | 60 | } |
61 | 61 | |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | public function registerCommands() |
75 | 75 | { |
76 | 76 | $commands = [ |
77 | - 'Migrations', |
|
78 | - 'Seeds', |
|
79 | - 'Backup', |
|
77 | + 'Migrations', |
|
78 | + 'Seeds', |
|
79 | + 'Backup', |
|
80 | 80 | ]; |
81 | 81 | |
82 | 82 | foreach ($commands as $command) { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | { |
99 | 99 | $this->app->singleton( |
100 | 100 | 'db-exporter.migrations', |
101 | - function ($app) { |
|
101 | + function($app) { |
|
102 | 102 | return new Commands\MigrationsGeneratorCommand($app[DbExportHandler::class]); |
103 | 103 | } |
104 | 104 | ); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | $this->app->singleton( |
115 | 115 | 'db-exporter.seeds', |
116 | - function ($app) { |
|
116 | + function($app) { |
|
117 | 117 | return new Commands\SeedGeneratorCommand($app[DbExportHandler::class]); |
118 | 118 | } |
119 | 119 | ); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | { |
126 | 126 | $this->app->singleton( |
127 | 127 | 'db-exporter.backup', |
128 | - function () { |
|
128 | + function() { |
|
129 | 129 | return new Commands\CopyToRemoteCommand(); |
130 | 130 | } |
131 | 131 | ); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | $this->app->bind( |
142 | 142 | DbExportHandler::class, |
143 | - function ($app) { |
|
143 | + function($app) { |
|
144 | 144 | // Instatiate a new DbSeeding class to send to the handler |
145 | 145 | $seeder = new DbSeeding($app[DbMigrations::class]->database); |
146 | 146 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | $this->app->bind( |
153 | 153 | 'DbExporter', |
154 | - function ($app) { |
|
154 | + function($app) { |
|
155 | 155 | return $app[DbExportHandler::class]; |
156 | 156 | } |
157 | 157 | ); |
@@ -27,27 +27,27 @@ |
||
27 | 27 | * @var array |
28 | 28 | **/ |
29 | 29 | protected $selects = [ |
30 | - 'column_name as Field', |
|
31 | - 'column_type as Type', |
|
32 | - 'is_nullable as null', |
|
33 | - 'column_key as Key', |
|
34 | - 'column_default as Default', |
|
35 | - 'extra as Extra', |
|
36 | - 'data_type as Data_Type', |
|
37 | - ]; |
|
30 | + 'column_name as Field', |
|
31 | + 'column_type as Type', |
|
32 | + 'is_nullable as null', |
|
33 | + 'column_key as Key', |
|
34 | + 'column_default as Default', |
|
35 | + 'extra as Extra', |
|
36 | + 'data_type as Data_Type', |
|
37 | + ]; |
|
38 | 38 | /** |
39 | 39 | * Select fields from constraints. |
40 | 40 | * |
41 | 41 | * @var array |
42 | 42 | **/ |
43 | 43 | protected $constraints = [ |
44 | - 'key_column_usage.table_name as Table', |
|
45 | - 'key_column_usage.column_name as Field', |
|
46 | - 'key_column_usage.referenced_table_name as ON', |
|
47 | - 'key_column_usage.referenced_column_name as References', |
|
48 | - 'REFERENTIAL_CONSTRAINTS.UPDATE_RULE as onUpdate', |
|
49 | - 'REFERENTIAL_CONSTRAINTS.DELETE_RULE as onDelete', |
|
50 | - ]; |
|
44 | + 'key_column_usage.table_name as Table', |
|
45 | + 'key_column_usage.column_name as Field', |
|
46 | + 'key_column_usage.referenced_table_name as ON', |
|
47 | + 'key_column_usage.referenced_column_name as References', |
|
48 | + 'REFERENTIAL_CONSTRAINTS.UPDATE_RULE as onUpdate', |
|
49 | + 'REFERENTIAL_CONSTRAINTS.DELETE_RULE as onDelete', |
|
50 | + ]; |
|
51 | 51 | |
52 | 52 | protected function getTables() |
53 | 53 | { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | { |
34 | 34 | $this->app->singleton( |
35 | 35 | DbMigrations::class, |
36 | - function () { |
|
36 | + function() { |
|
37 | 37 | $connType = Config::get('database.default'); |
38 | 38 | $database = Config::get('database.connections.' . $connType); |
39 | 39 |