@@ -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,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 | } |