Total Complexity | 2 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class AddConfigurationTable20220109074106 extends AbstractMigration |
||
11 | { |
||
12 | public function up(): void |
||
13 | { |
||
14 | //Action when migrate up |
||
15 | $this->create('configurations', function (CreateTable $table) { |
||
16 | $table->integer('id') |
||
17 | ->autoincrement() |
||
18 | ->primary(); |
||
19 | |||
20 | $table->string('env') |
||
21 | ->description('The config environment') |
||
22 | ->index(); |
||
23 | |||
24 | $table->string('module') |
||
25 | ->description('The module') |
||
26 | ->index() |
||
27 | ->notNull(); |
||
28 | |||
29 | $table->string('name') |
||
30 | ->description('The config name') |
||
31 | ->index() |
||
32 | ->notNull(); |
||
33 | |||
34 | $table->text('value') |
||
35 | ->description('The config value'); |
||
36 | |||
37 | $table->string('type') |
||
38 | ->description('The config data type') |
||
39 | ->notNull(); |
||
40 | |||
41 | $table->text('comment') |
||
42 | ->description('The config description'); |
||
43 | |||
44 | $table->enum('status', ['Y', 'N']) |
||
45 | ->description('The config status') |
||
46 | ->defaultValue('Y') |
||
47 | ->notNull(); |
||
48 | |||
49 | $table->timestamps(); |
||
50 | |||
51 | $table->engine('INNODB'); |
||
52 | }); |
||
53 | } |
||
54 | |||
55 | public function down(): void |
||
59 | } |
||
60 | } |
||
61 |