| @@ 7-30 (lines=24) @@ | ||
| 4 | use Illuminate\Database\Schema\Blueprint; |
|
| 5 | use Illuminate\Database\Migrations\Migration; |
|
| 6 | ||
| 7 | class CreateCyclesTable extends Migration |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * Run the migrations. |
|
| 11 | * |
|
| 12 | * @return void |
|
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create('cycles', function (Blueprint $table) { |
|
| 17 | $table->increments('id'); |
|
| 18 | $table->timestamps(); |
|
| 19 | }); |
|
| 20 | } |
|
| 21 | /** |
|
| 22 | * Reverse the migrations. |
|
| 23 | * |
|
| 24 | * @return void |
|
| 25 | */ |
|
| 26 | public function down() |
|
| 27 | { |
|
| 28 | Schema::dropIfExists('cycles'); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 10-34 (lines=25) @@ | ||
| 7 | /** |
|
| 8 | * Class CreateLawsTable. |
|
| 9 | */ |
|
| 10 | class CreateLawsTable extends Migration |
|
| 11 | { |
|
| 12 | /** |
|
| 13 | * Run the migrations. |
|
| 14 | * |
|
| 15 | * @return void |
|
| 16 | */ |
|
| 17 | public function up() |
|
| 18 | { |
|
| 19 | Schema::create('laws', function (Blueprint $table) { |
|
| 20 | $table->increments('id'); |
|
| 21 | $table->string('name'); |
|
| 22 | $table->timestamps(); |
|
| 23 | }); |
|
| 24 | } |
|
| 25 | /** |
|
| 26 | * Reverse the migrations. |
|
| 27 | * |
|
| 28 | * @return void |
|
| 29 | */ |
|
| 30 | public function down() |
|
| 31 | { |
|
| 32 | Schema::dropIfExists('laws'); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 10-34 (lines=25) @@ | ||
| 7 | /** |
|
| 8 | * Class CreateSubmoduleTypesTable |
|
| 9 | */ |
|
| 10 | class CreateSubmoduleTypesTable extends Migration |
|
| 11 | { |
|
| 12 | /** |
|
| 13 | * Run the migrations. |
|
| 14 | * |
|
| 15 | * @return void |
|
| 16 | */ |
|
| 17 | public function up() |
|
| 18 | { |
|
| 19 | Schema::create('submodule_types', function (Blueprint $table) { |
|
| 20 | $table->increments('id'); |
|
| 21 | $table->string('name')->unique(); |
|
| 22 | $table->timestamps(); |
|
| 23 | }); |
|
| 24 | } |
|
| 25 | /** |
|
| 26 | * Reverse the migrations. |
|
| 27 | * |
|
| 28 | * @return void |
|
| 29 | */ |
|
| 30 | public function down() |
|
| 31 | { |
|
| 32 | Schema::dropIfExists('submodule_types'); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||