12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
-
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
-
- class CreateDepartmentsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('departments', function (Blueprint $table) {
- $table->unsignedBigInteger('id')->primary();
- $table->string('name')->nullable();
- $table->string('title')->nullable();
- });
-
- // DB::table('departments')->insert(
- // array(
- // array('id' => '1','name' => 'BIOL', 'title' => 'Biolo'),
- // array('id' => '4','name' => 'CIAM', 'title' => ),
- // array('id' => '2','name' => 'FISI', 'title' => ),
- // array('id' => '3','name' => 'MATE', 'title' => ),
- // array('id' => '5','name' => 'PGCN', 'title' => ),
- // array('id' => '6','name' => 'QUIM', 'title' => ),
- // array('id' => '7','name' => 'default'),
- // ));
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('departments');
- }
- }
|