added personal_carts and put dynamic client
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCartsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('personal_carts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('ic_no');
|
||||
$table->json('list_pkb');
|
||||
$table->json('list_koop');
|
||||
$table->enum('status_pkb', ['PENDING', 'PAID','NONE']);
|
||||
$table->enum('status_koop', ['PENDING', 'PAID','NONE']);
|
||||
$table->softDeletes();
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('personal_carts');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user