@@ -56,8 +56,7 @@ |
||
56 | 56 | * class MigrationEntity |
57 | 57 | * @package Platine\Framework\Migration |
58 | 58 | */ |
59 | -class MigrationEntity extends Entity |
|
60 | -{ |
|
59 | +class MigrationEntity extends Entity { |
|
61 | 60 | |
62 | 61 | /** |
63 | 62 | * {@inheritdoc} |
@@ -54,15 +54,13 @@ |
||
54 | 54 | * class MigrationRepository |
55 | 55 | * @package Platine\Framework\Migration |
56 | 56 | */ |
57 | -class MigrationRepository extends Repository |
|
58 | -{ |
|
57 | +class MigrationRepository extends Repository { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * Create new instance |
62 | 61 | * @param EntityManager $manager |
63 | 62 | */ |
64 | - public function __construct(EntityManager $manager) |
|
65 | - { |
|
63 | + public function __construct(EntityManager $manager) { |
|
66 | 64 | parent::__construct($manager, MigrationEntity::class); |
67 | 65 | } |
68 | 66 | } |
@@ -8,13 +8,13 @@ |
||
8 | 8 | |
9 | 9 | public function up(): void |
10 | 10 | { |
11 | - //Action when migrate up |
|
11 | + //Action when migrate up |
|
12 | 12 | |
13 | 13 | } |
14 | 14 | |
15 | 15 | public function down(): void |
16 | 16 | { |
17 | - //Action when migrate down |
|
17 | + //Action when migrate down |
|
18 | 18 | |
19 | 19 | } |
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -3,8 +3,7 @@ |
||
3 | 3 | |
4 | 4 | use Platine\Framework\Migration\AbstractMigration; |
5 | 5 | |
6 | -class AddSessionsTable20210704172442 extends AbstractMigration |
|
7 | -{ |
|
6 | +class AddSessionsTable20210704172442 extends AbstractMigration { |
|
8 | 7 | |
9 | 8 | public function up(): void |
10 | 9 | { |
@@ -7,20 +7,20 @@ |
||
7 | 7 | class AddRoleCode20210704170839 extends AbstractMigration |
8 | 8 | { |
9 | 9 | |
10 | - public function up(): void |
|
11 | - { |
|
10 | + public function up(): void |
|
11 | + { |
|
12 | 12 | //Action when migrate up |
13 | 13 | $this->alter('roles', function (AlterTable $table) { |
14 | 14 | $table->string('code')->notNull(); |
15 | 15 | $table->unique('code'); |
16 | 16 | }); |
17 | - } |
|
17 | + } |
|
18 | 18 | |
19 | - public function down(): void |
|
20 | - { |
|
19 | + public function down(): void |
|
20 | + { |
|
21 | 21 | //Action when migrate down |
22 | 22 | $this->alter('roles', function (AlterTable $table) { |
23 | 23 | $table->dropColumn('code'); |
24 | 24 | }); |
25 | - } |
|
25 | + } |
|
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | public function up(): void |
11 | 11 | { |
12 | 12 | //Action when migrate up |
13 | - $this->alter('roles', function (AlterTable $table) { |
|
13 | + $this->alter('roles', function(AlterTable $table) { |
|
14 | 14 | $table->string('code')->notNull(); |
15 | 15 | $table->unique('code'); |
16 | 16 | }); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | public function down(): void |
20 | 20 | { |
21 | 21 | //Action when migrate down |
22 | - $this->alter('roles', function (AlterTable $table) { |
|
22 | + $this->alter('roles', function(AlterTable $table) { |
|
23 | 23 | $table->dropColumn('code'); |
24 | 24 | }); |
25 | 25 | } |
@@ -4,8 +4,7 @@ |
||
4 | 4 | use Platine\Database\Schema\AlterTable; |
5 | 5 | use Platine\Framework\Migration\AbstractMigration; |
6 | 6 | |
7 | - class AddRoleCode20210704170839 extends AbstractMigration |
|
8 | - { |
|
7 | + class AddRoleCode20210704170839 extends AbstractMigration { |
|
9 | 8 | |
10 | 9 | public function up(): void |
11 | 10 | { |
@@ -7,15 +7,15 @@ discard block |
||
7 | 7 | class AddRolesTable20210704165744 extends AbstractMigration |
8 | 8 | { |
9 | 9 | |
10 | - public function up(): void |
|
11 | - { |
|
10 | + public function up(): void |
|
11 | + { |
|
12 | 12 | //Action when migrate up |
13 | 13 | $this->create('roles', function (CreateTable $table) { |
14 | 14 | $table->integer('id') |
15 | 15 | ->autoincrement() |
16 | - ->primary(); |
|
16 | + ->primary(); |
|
17 | 17 | $table->string('description') |
18 | - ->description('The role description'); |
|
18 | + ->description('The role description'); |
|
19 | 19 | $table->datetime('created_at') |
20 | 20 | ->description('role created at') |
21 | 21 | ->notNull(); |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | |
25 | 25 | $table->engine('INNODB'); |
26 | 26 | }); |
27 | - } |
|
27 | + } |
|
28 | 28 | |
29 | - public function down(): void |
|
30 | - { |
|
29 | + public function down(): void |
|
30 | + { |
|
31 | 31 | //Action when migrate down |
32 | 32 | $this->drop('roles'); |
33 | - } |
|
33 | + } |
|
34 | 34 | } |
35 | 35 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
10 | 10 | public function up(): void |
11 | 11 | { |
12 | 12 | //Action when migrate up |
13 | - $this->create('roles', function (CreateTable $table) { |
|
13 | + $this->create('roles', function(CreateTable $table) { |
|
14 | 14 | $table->integer('id') |
15 | 15 | ->autoincrement() |
16 | 16 | ->primary(); |
@@ -4,8 +4,7 @@ |
||
4 | 4 | use Platine\Database\Schema\CreateTable; |
5 | 5 | use Platine\Framework\Migration\AbstractMigration; |
6 | 6 | |
7 | - class AddRolesTable20210704165744 extends AbstractMigration |
|
8 | - { |
|
7 | + class AddRolesTable20210704165744 extends AbstractMigration { |
|
9 | 8 | |
10 | 9 | public function up(): void |
11 | 10 | { |