Files
FlightsAPI/database/migrations/2026_04_01_000544_create_airlines_table.php
2026-04-01 11:42:32 +10:00

35 lines
934 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('airlines', function (Blueprint $table) {
$table->id();
$table->string('IATA_code', 3)->nullable();
$table->string('ICAO_code', 4)->nullable();
$table->string('name', 81)->nullable();
$table->string('internal_name', 81)->nullable();
$table->string('country_code', 2)->nullable();
$table->string('country_name', 36)->nullable();
$table->boolean('active');
$table->string('logo', 40)->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('airlines');
}
};