| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class ModifyRolesAndPermissionsTablesRemoveTimestamps extends BaseMigration |
||
| 7 | { |
||
| 8 | public function up() |
||
| 9 | { |
||
| 10 | $this->dropTimestamps($this->roles); |
||
| 11 | $this->dropTimestamps($this->permissions); |
||
| 12 | } |
||
| 13 | |||
| 14 | public function down() |
||
| 15 | { |
||
| 16 | $this->createTimestamps($this->roles); |
||
| 17 | $this->createTimestamps($this->permissions); |
||
| 18 | } |
||
| 19 | |||
| 20 | protected function dropTimestamps(string $table) |
||
| 21 | { |
||
| 22 | $this->table($table, function (Blueprint $table) { |
||
| 23 | $table->dropTimestamps(); |
||
| 24 | }); |
||
| 25 | } |
||
| 26 | |||
| 27 | protected function createTimestamps(string $table) |
||
| 31 | }); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |