| @@ 18-32 (lines=15) @@ | ||
| 15 | $this->dropAllTables(); |
|
| 16 | } |
|
| 17 | ||
| 18 | protected function migrateUp() |
|
| 19 | { |
|
| 20 | $this->builder->create( |
|
| 21 | 'firewall', |
|
| 22 | function ($table) { |
|
| 23 | $table->increments('id'); |
|
| 24 | ||
| 25 | $table->string('ip_address', 39)->unique()->index(); |
|
| 26 | ||
| 27 | $table->boolean('whitelisted')->default(false); /// default is blacklist |
|
| 28 | ||
| 29 | $table->timestamps(); |
|
| 30 | } |
|
| 31 | ); |
|
| 32 | } |
|
| 33 | } |
|
| 34 | ||
| @@ 14-25 (lines=12) @@ | ||
| 11 | * |
|
| 12 | * @return void |
|
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create('firewall', function (Blueprint $table) { |
|
| 17 | $table->increments('id'); |
|
| 18 | ||
| 19 | $table->string('ip_address', 39)->unique()->index(); |
|
| 20 | ||
| 21 | $table->boolean('whitelisted')->default(false); /// default is blacklist |
|
| 22 | ||
| 23 | $table->timestamps(); |
|
| 24 | }); |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * Reverse the migration. |
|