Adding Laravel Project
This commit is contained in:
34
database/migrations/2021_04_06_044648_create_ships_table.php
Normal file
34
database/migrations/2021_04_06_044648_create_ships_table.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShipsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('ships', function (Blueprint $table) {
|
||||
$table->string('id')->unique;
|
||||
$table->string('shipId')->unique();
|
||||
$table->string('shipName');
|
||||
$table->string('shipOwner');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('ships');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user