This commit is contained in:
Azfar Arsyad
2022-01-20 15:47:01 +08:00
parent 3c20c03ab9
commit 043925ea9b
7 changed files with 184 additions and 20 deletions
@@ -17,7 +17,7 @@ class CreateFileTable extends Migration
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id')->unsigned();
$table->string('file_type');
$table->string('filename');
$table->binary('filename');
$table->datetime('deleted_at')->nullable();
$table->integer('deleted_by')->nullable();
$table->timestamps();
@@ -14,8 +14,19 @@ class CreateCartsTable extends Migration
public function up()
{
Schema::create('carts', function (Blueprint $table) {
$table->id();
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id')->unsigned();
$table->unsignedBigInteger('lelongbid_id')->unsigned();
$table->decimal('hargabida', $precision = 9, $scale = 2);
$table->timestamps();
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
$table->foreign('lelongbid_id')
->references('id')->on('lelongbid')
->onDelete('cascade');
});
}