@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use Platine\Database\Schema\CreateTable; |
| 8 | 8 | use Platine\Framework\Migration\AbstractMigration; |
| 9 | 9 | |
| 10 | -class AddAuditsTable20220323095520 extends AbstractMigration |
|
| 11 | -{ |
|
| 10 | +class AddAuditsTable20220323095520 extends AbstractMigration { |
|
| 12 | 11 | public function up(): void |
| 13 | 12 | { |
| 14 | 13 | //Action when migrate up |
@@ -11,11 +11,11 @@ discard block |
||
| 11 | 11 | { |
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | - //Action when migrate up |
|
| 14 | + //Action when migrate up |
|
| 15 | 15 | $this->create('audits', function (CreateTable $table) { |
| 16 | 16 | $table->integer('id') |
| 17 | - ->autoincrement() |
|
| 18 | - ->primary(); |
|
| 17 | + ->autoincrement() |
|
| 18 | + ->primary(); |
|
| 19 | 19 | |
| 20 | 20 | $table->string('event') |
| 21 | 21 | ->description('The audit event') |
@@ -23,20 +23,20 @@ discard block |
||
| 23 | 23 | ->notNull(); |
| 24 | 24 | |
| 25 | 25 | $table->text('detail') |
| 26 | - ->description('The audit detail'); |
|
| 26 | + ->description('The audit detail'); |
|
| 27 | 27 | |
| 28 | 28 | $table->string('url') |
| 29 | - ->description('The audit action URL'); |
|
| 29 | + ->description('The audit action URL'); |
|
| 30 | 30 | |
| 31 | 31 | $table->string('ip') |
| 32 | - ->description('The IP address') |
|
| 33 | - ->notNull(); |
|
| 32 | + ->description('The IP address') |
|
| 33 | + ->notNull(); |
|
| 34 | 34 | |
| 35 | 35 | $table->string('user_agent') |
| 36 | - ->description('The user agent'); |
|
| 36 | + ->description('The user agent'); |
|
| 37 | 37 | |
| 38 | 38 | $table->string('tags') |
| 39 | - ->description('The audit tags'); |
|
| 39 | + ->description('The audit tags'); |
|
| 40 | 40 | |
| 41 | 41 | $table->datetime('date') |
| 42 | 42 | ->description('audit date') |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | public function down(): void |
| 58 | 58 | { |
| 59 | - //Action when migrate down |
|
| 59 | + //Action when migrate down |
|
| 60 | 60 | $this->drop('audits'); |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('audits', function (CreateTable $table) { |
|
| 15 | + $this->create('audits', function(CreateTable $table) { |
|
| 16 | 16 | $table->integer('id') |
| 17 | 17 | ->autoincrement() |
| 18 | 18 | ->primary(); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('permissions', function (CreateTable $table) { |
|
| 13 | + $this->create('permissions', function(CreateTable $table) { |
|
| 14 | 14 | $table->integer('id') |
| 15 | 15 | ->autoincrement() |
| 16 | 16 | ->primary(); |
@@ -5,8 +5,7 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddPermissionsTable20210717094547 extends AbstractMigration |
|
| 9 | -{ |
|
| 8 | +class AddPermissionsTable20210717094547 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | { |
| 12 | 11 | //Action when migrate up |
@@ -9,29 +9,29 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | - //Action when migrate up |
|
| 12 | + //Action when migrate up |
|
| 13 | 13 | $this->create('permissions', function (CreateTable $table) { |
| 14 | 14 | $table->integer('id') |
| 15 | - ->autoincrement() |
|
| 16 | - ->primary(); |
|
| 15 | + ->autoincrement() |
|
| 16 | + ->primary(); |
|
| 17 | 17 | |
| 18 | 18 | $table->string('code') |
| 19 | - ->description('The permission code') |
|
| 20 | - ->unique() |
|
| 21 | - ->notNull(); |
|
| 19 | + ->description('The permission code') |
|
| 20 | + ->unique() |
|
| 21 | + ->notNull(); |
|
| 22 | 22 | |
| 23 | 23 | $table->string('description') |
| 24 | - ->description('The permission description') |
|
| 25 | - ->notNull(); |
|
| 24 | + ->description('The permission description') |
|
| 25 | + ->notNull(); |
|
| 26 | 26 | |
| 27 | 27 | $table->integer('parent_id') |
| 28 | - ->description('The parent permission'); |
|
| 28 | + ->description('The parent permission'); |
|
| 29 | 29 | |
| 30 | 30 | $table->timestamps(); |
| 31 | 31 | |
| 32 | 32 | $table->foreign('parent_id') |
| 33 | - ->references('permissions', 'id') |
|
| 34 | - ->onDelete('CASCADE'); |
|
| 33 | + ->references('permissions', 'id') |
|
| 34 | + ->onDelete('CASCADE'); |
|
| 35 | 35 | |
| 36 | 36 | $table->engine('INNODB'); |
| 37 | 37 | }); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public function down(): void |
| 41 | 41 | { |
| 42 | - //Action when migrate down |
|
| 42 | + //Action when migrate down |
|
| 43 | 43 | $this->drop('permissions'); |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | - //Action when migrate up |
|
| 12 | + //Action when migrate up |
|
| 13 | 13 | $this->create('permissions_roles', function (CreateTable $table) { |
| 14 | 14 | $table->integer('permission_id'); |
| 15 | 15 | $table->integer('role_id'); |
@@ -17,12 +17,12 @@ discard block |
||
| 17 | 17 | $table->primary(['permission_id', 'role_id']); |
| 18 | 18 | |
| 19 | 19 | $table->foreign('permission_id') |
| 20 | - ->references('permissions', 'id') |
|
| 21 | - ->onDelete('CASCADE'); |
|
| 20 | + ->references('permissions', 'id') |
|
| 21 | + ->onDelete('CASCADE'); |
|
| 22 | 22 | |
| 23 | 23 | $table->foreign('role_id') |
| 24 | - ->references('roles', 'id') |
|
| 25 | - ->onDelete('CASCADE'); |
|
| 24 | + ->references('roles', 'id') |
|
| 25 | + ->onDelete('CASCADE'); |
|
| 26 | 26 | |
| 27 | 27 | $table->engine('INNODB'); |
| 28 | 28 | }); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public function down(): void |
| 32 | 32 | { |
| 33 | - //Action when migrate down |
|
| 33 | + //Action when migrate down |
|
| 34 | 34 | $this->drop('permissions_roles'); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('permissions_roles', function (CreateTable $table) { |
|
| 13 | + $this->create('permissions_roles', function(CreateTable $table) { |
|
| 14 | 14 | $table->integer('permission_id'); |
| 15 | 15 | $table->integer('role_id'); |
| 16 | 16 | |
@@ -5,8 +5,7 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddPermissionRolesTable20210717094822 extends AbstractMigration |
|
| 9 | -{ |
|
| 8 | +class AddPermissionRolesTable20210717094822 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | { |
| 12 | 11 | //Action when migrate up |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | - //Action when migrate up |
|
| 12 | + //Action when migrate up |
|
| 13 | 13 | $this->create('roles_users', function (CreateTable $table) { |
| 14 | 14 | $table->integer('user_id'); |
| 15 | 15 | $table->integer('role_id'); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public function down(): void |
| 32 | 32 | { |
| 33 | - //Action when migrate down |
|
| 33 | + //Action when migrate down |
|
| 34 | 34 | $this->drop('roles_users'); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('roles_users', function (CreateTable $table) { |
|
| 13 | + $this->create('roles_users', function(CreateTable $table) { |
|
| 14 | 14 | $table->integer('user_id'); |
| 15 | 15 | $table->integer('role_id'); |
| 16 | 16 | |
@@ -5,8 +5,7 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddRoleUsersTable20210717100434 extends AbstractMigration |
|
| 9 | -{ |
|
| 8 | +class AddRoleUsersTable20210717100434 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | { |
| 12 | 11 | //Action when migrate up |
@@ -5,8 +5,7 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddApiTokensTable20210823152146 extends AbstractMigration |
|
| 9 | -{ |
|
| 8 | +class AddApiTokensTable20210823152146 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | { |
| 12 | 11 | //Action when migrate up |
@@ -9,26 +9,26 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | - //Action when migrate up |
|
| 12 | + //Action when migrate up |
|
| 13 | 13 | $this->create('tokens', function (CreateTable $table) { |
| 14 | 14 | $table->integer('id') |
| 15 | 15 | ->autoincrement() |
| 16 | 16 | ->primary(); |
| 17 | 17 | |
| 18 | 18 | $table->string('token') |
| 19 | - ->unique() |
|
| 20 | - ->notNull(); |
|
| 19 | + ->unique() |
|
| 20 | + ->notNull(); |
|
| 21 | 21 | |
| 22 | 22 | $table->string('refresh_token') |
| 23 | - ->unique() |
|
| 24 | - ->notNull(); |
|
| 23 | + ->unique() |
|
| 24 | + ->notNull(); |
|
| 25 | 25 | |
| 26 | 26 | $table->datetime('expire_at') |
| 27 | - ->notNull(); |
|
| 27 | + ->notNull(); |
|
| 28 | 28 | |
| 29 | 29 | $table->integer('user_id') |
| 30 | - ->description('The owner of the token') |
|
| 31 | - ->notNull(); |
|
| 30 | + ->description('The owner of the token') |
|
| 31 | + ->notNull(); |
|
| 32 | 32 | |
| 33 | 33 | $table->timestamps(); |
| 34 | 34 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public function down(): void |
| 44 | 44 | { |
| 45 | - //Action when migrate down |
|
| 45 | + //Action when migrate down |
|
| 46 | 46 | $this->drop('tokens'); |
| 47 | 47 | } |
| 48 | 48 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('tokens', function (CreateTable $table) { |
|
| 13 | + $this->create('tokens', function(CreateTable $table) { |
|
| 14 | 14 | $table->integer('id') |
| 15 | 15 | ->autoincrement() |
| 16 | 16 | ->primary(); |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use Platine\Database\Schema\CreateTable; |
| 8 | 8 | use Platine\Framework\Migration\AbstractMigration; |
| 9 | 9 | |
| 10 | -class AddConfigurationTable20220109074106 extends AbstractMigration |
|
| 11 | -{ |
|
| 10 | +class AddConfigurationTable20220109074106 extends AbstractMigration { |
|
| 12 | 11 | public function up(): void |
| 13 | 12 | { |
| 14 | 13 | //Action when migrate up |
@@ -11,15 +11,15 @@ discard block |
||
| 11 | 11 | { |
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | - //Action when migrate up |
|
| 14 | + //Action when migrate up |
|
| 15 | 15 | $this->create('configurations', function (CreateTable $table) { |
| 16 | 16 | $table->integer('id') |
| 17 | 17 | ->autoincrement() |
| 18 | 18 | ->primary(); |
| 19 | 19 | |
| 20 | 20 | $table->string('env') |
| 21 | - ->description('The config environment') |
|
| 22 | - ->index(); |
|
| 21 | + ->description('The config environment') |
|
| 22 | + ->index(); |
|
| 23 | 23 | |
| 24 | 24 | $table->string('module') |
| 25 | 25 | ->description('The module') |
@@ -27,24 +27,24 @@ discard block |
||
| 27 | 27 | ->notNull(); |
| 28 | 28 | |
| 29 | 29 | $table->string('name') |
| 30 | - ->description('The config name') |
|
| 31 | - ->index() |
|
| 32 | - ->notNull(); |
|
| 30 | + ->description('The config name') |
|
| 31 | + ->index() |
|
| 32 | + ->notNull(); |
|
| 33 | 33 | |
| 34 | 34 | $table->text('value') |
| 35 | 35 | ->description('The config value'); |
| 36 | 36 | |
| 37 | 37 | $table->string('type') |
| 38 | - ->description('The config data type') |
|
| 39 | - ->notNull(); |
|
| 38 | + ->description('The config data type') |
|
| 39 | + ->notNull(); |
|
| 40 | 40 | |
| 41 | 41 | $table->text('comment') |
| 42 | - ->description('The config description'); |
|
| 42 | + ->description('The config description'); |
|
| 43 | 43 | |
| 44 | 44 | $table->enum('status', ['Y', 'N']) |
| 45 | - ->description('The config status') |
|
| 46 | - ->defaultValue('Y') |
|
| 47 | - ->notNull(); |
|
| 45 | + ->description('The config status') |
|
| 46 | + ->defaultValue('Y') |
|
| 47 | + ->notNull(); |
|
| 48 | 48 | |
| 49 | 49 | $table->timestamps(); |
| 50 | 50 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | public function down(): void |
| 56 | 56 | { |
| 57 | - //Action when migrate down |
|
| 57 | + //Action when migrate down |
|
| 58 | 58 | $this->drop('configurations'); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public function up(): void |
| 13 | 13 | { |
| 14 | 14 | //Action when migrate up |
| 15 | - $this->create('configurations', function (CreateTable $table) { |
|
| 15 | + $this->create('configurations', function(CreateTable $table) { |
|
| 16 | 16 | $table->integer('id') |
| 17 | 17 | ->autoincrement() |
| 18 | 18 | ->primary(); |
@@ -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(); |
@@ -5,8 +5,7 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddRolesTable20210705065247 extends AbstractMigration |
|
| 9 | -{ |
|
| 8 | +class AddRolesTable20210705065247 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | { |
| 12 | 11 | //Action when migrate up |
@@ -9,18 +9,18 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | - //Action when migrate up |
|
| 12 | + //Action when migrate up |
|
| 13 | 13 | $this->create('roles', function (CreateTable $table) { |
| 14 | 14 | $table->integer('id') |
| 15 | - ->autoincrement() |
|
| 16 | - ->primary(); |
|
| 15 | + ->autoincrement() |
|
| 16 | + ->primary(); |
|
| 17 | 17 | |
| 18 | 18 | $table->string('name') |
| 19 | - ->description('The role name') |
|
| 20 | - ->notNull(); |
|
| 19 | + ->description('The role name') |
|
| 20 | + ->notNull(); |
|
| 21 | 21 | |
| 22 | 22 | $table->string('description') |
| 23 | - ->description('The role description'); |
|
| 23 | + ->description('The role description'); |
|
| 24 | 24 | |
| 25 | 25 | $table->timestamps(); |
| 26 | 26 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public function down(): void |
| 32 | 32 | { |
| 33 | - //Action when migrate down |
|
| 33 | + //Action when migrate down |
|
| 34 | 34 | $this->drop('roles'); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('users', function (CreateTable $table) { |
|
| 13 | + $this->create('users', function(CreateTable $table) { |
|
| 14 | 14 | $table->integer('id') |
| 15 | 15 | ->autoincrement() |
| 16 | 16 | ->primary(); |
@@ -5,8 +5,7 @@ |
||
| 5 | 5 | use Platine\Database\Schema\CreateTable; |
| 6 | 6 | use Platine\Framework\Migration\AbstractMigration; |
| 7 | 7 | |
| 8 | -class AddUsersTable20210705065248 extends AbstractMigration |
|
| 9 | -{ |
|
| 8 | +class AddUsersTable20210705065248 extends AbstractMigration { |
|
| 10 | 9 | public function up(): void |
| 11 | 10 | { |
| 12 | 11 | //Action when migrate up |
@@ -9,41 +9,41 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | - //Action when migrate up |
|
| 12 | + //Action when migrate up |
|
| 13 | 13 | $this->create('users', function (CreateTable $table) { |
| 14 | 14 | $table->integer('id') |
| 15 | - ->autoincrement() |
|
| 16 | - ->primary(); |
|
| 15 | + ->autoincrement() |
|
| 16 | + ->primary(); |
|
| 17 | 17 | |
| 18 | 18 | $table->string('username') |
| 19 | - ->description('The username') |
|
| 20 | - ->unique() |
|
| 21 | - ->notNull(); |
|
| 19 | + ->description('The username') |
|
| 20 | + ->unique() |
|
| 21 | + ->notNull(); |
|
| 22 | 22 | |
| 23 | 23 | $table->string('email') |
| 24 | - ->description('The user email') |
|
| 25 | - ->unique() |
|
| 26 | - ->notNull(); |
|
| 24 | + ->description('The user email') |
|
| 25 | + ->unique() |
|
| 26 | + ->notNull(); |
|
| 27 | 27 | |
| 28 | 28 | $table->string('password') |
| 29 | - ->description('The user password') |
|
| 30 | - ->notNull(); |
|
| 29 | + ->description('The user password') |
|
| 30 | + ->notNull(); |
|
| 31 | 31 | |
| 32 | 32 | $table->enum('status', ['A', 'D']) |
| 33 | - ->description('The user status, A=Active, D=Deactive/Locked') |
|
| 34 | - ->defaultValue('D') |
|
| 35 | - ->notNull(); |
|
| 33 | + ->description('The user status, A=Active, D=Deactive/Locked') |
|
| 34 | + ->defaultValue('D') |
|
| 35 | + ->notNull(); |
|
| 36 | 36 | |
| 37 | 37 | $table->string('lastname') |
| 38 | - ->description('The user lastname') |
|
| 39 | - ->notNull(); |
|
| 38 | + ->description('The user lastname') |
|
| 39 | + ->notNull(); |
|
| 40 | 40 | |
| 41 | 41 | $table->string('firstname') |
| 42 | - ->description('The user firstname') |
|
| 43 | - ->notNull(); |
|
| 42 | + ->description('The user firstname') |
|
| 43 | + ->notNull(); |
|
| 44 | 44 | |
| 45 | 45 | $table->string('role') |
| 46 | - ->description('The user role or job'); |
|
| 46 | + ->description('The user role or job'); |
|
| 47 | 47 | |
| 48 | 48 | $table->timestamps(); |
| 49 | 49 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function down(): void |
| 55 | 55 | { |
| 56 | - //Action when migrate down |
|
| 56 | + //Action when migrate down |
|
| 57 | 57 | $this->drop('users'); |
| 58 | 58 | } |
| 59 | 59 | } |
@@ -9,6 +9,6 @@ |
||
| 9 | 9 | ErrorHandlerMiddleware::class, |
| 10 | 10 | RouteMatchMiddleware::class, |
| 11 | 11 | DemoMiddleware::class, |
| 12 | - // SecurityPolicyMiddleware::class, |
|
| 12 | + // SecurityPolicyMiddleware::class, |
|
| 13 | 13 | RouteDispatcherMiddleware::class, |
| 14 | 14 | ]; |