123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateStaffTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('staff', function (Blueprint $table) {
- $table->id();
- $table->String('lastname');
- $table->String('firstname');
- $table->String('middlename');
- $table->bigInteger('position_id')->unsigned();
- $table->foreign('position_id')->references('id')->on('positions')->onDelete('cascade');
- $table->time('air_time');
- $table->string('passport_data', 10);
- $table->string('phone', 15);
- $table->date('birth_date');
- $table->string('address');
- $table->boolean('in_flight')->default(false);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('staff');
- }
- }
|