@@ -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 | ), |
@@ -27,27 +27,27 @@ |
||
27 | 27 | * @var array |
28 | 28 | **/ |
29 | 29 | protected $selects = array( |
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 = array( |
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 @@ 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) { |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | // Symfony style block messages |
38 | 38 | $formatter = $this->getHelperSet()->get('formatter'); |
39 | 39 | $errorMessages = array( |
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 array( |
64 | 64 | array( |
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 array( |
77 | 77 | array( |
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() |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | protected $description = 'Command to copy the migrations and/or the seeds to a remote host.'; |
14 | 14 | |
15 | 15 | protected $ignoredFiles = [ |
16 | - '..', |
|
17 | - '.', |
|
18 | - '.gitkeep', |
|
19 | - ]; |
|
16 | + '..', |
|
17 | + '.', |
|
18 | + '.gitkeep', |
|
19 | + ]; |
|
20 | 20 | |
21 | 21 | protected $uploadedFiles; |
22 | 22 | |
@@ -52,20 +52,20 @@ discard block |
||
52 | 52 | { |
53 | 53 | return [ |
54 | 54 | [ |
55 | - 'migrations', |
|
56 | - 'm', |
|
57 | - InputOption::VALUE_NONE, |
|
58 | - 'Upload the migrations to a storage.', |
|
59 | - null, |
|
55 | + 'migrations', |
|
56 | + 'm', |
|
57 | + InputOption::VALUE_NONE, |
|
58 | + 'Upload the migrations to a storage.', |
|
59 | + null, |
|
60 | 60 | ], |
61 | 61 | [ |
62 | - 'seeds', |
|
63 | - 's', |
|
64 | - InputOption::VALUE_NONE, |
|
65 | - 'Upload the seeds to the remote host.', |
|
66 | - null, |
|
62 | + 'seeds', |
|
63 | + 's', |
|
64 | + InputOption::VALUE_NONE, |
|
65 | + 'Upload the seeds to the remote host.', |
|
66 | + null, |
|
67 | 67 | ], |
68 | - ]; |
|
68 | + ]; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | //end getOptions() |
@@ -42,9 +42,9 @@ |
||
42 | 42 | $formatter = $this->getHelperSet()->get('formatter'); |
43 | 43 | $filename = $this->getFilename(); |
44 | 44 | $errorMessages = [ |
45 | - 'Success!', |
|
46 | - "Database seed class generated in: {$filename}", |
|
47 | - ]; |
|
45 | + 'Success!', |
|
46 | + "Database seed class generated in: {$filename}", |
|
47 | + ]; |
|
48 | 48 | $formattedBlock = $formatter->formatBlock($errorMessages, 'info', true); |
49 | 49 | $this->line($formattedBlock); |
50 | 50 | } |
@@ -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 | protected $schema; |
39 | 39 | |
@@ -171,11 +171,11 @@ discard block |
||
171 | 171 | } |
172 | 172 | |
173 | 173 | $this->schema[$value['table_name']] = array( |
174 | - 'up' => $up, |
|
175 | - 'constraint' => $Constraint, |
|
176 | - 'constraint_down' => $ConstraintDown, |
|
177 | - 'down' => $down, |
|
178 | - ); |
|
174 | + 'up' => $up, |
|
175 | + 'constraint' => $Constraint, |
|
176 | + 'constraint_down' => $ConstraintDown, |
|
177 | + 'down' => $down, |
|
178 | + ); |
|
179 | 179 | }//end foreach |
180 | 180 | |
181 | 181 | return $this; |