add addresses

This commit is contained in:
Edward Yang 2022-06-28 15:21:32 +08:00
parent a5b7cb2bb8
commit fb1a2a16f1
1 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,42 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAddress extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('addresses', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('customer_id');
$table->string('name');
$table->string('phone');
$table->unsignedInteger('country_id');
$table->unsignedInteger('state_id');
$table->string('state');
$table->unsignedInteger('city_id');
$table->string('city');
$table->string('zipcode');
$table->string('address_1');
$table->string('address_2');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('address');
}
}