restore composer.json, add mysqli extension
This commit is contained in:
40
database/migrations/2020_08_22_130059_create_billings_table.php
Executable file
40
database/migrations/2020_08_22_130059_create_billings_table.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBillingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('billings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('order_id');
|
||||
$table->enum('status', ['payed', 'waiting', 'refused'])->default('waiting');
|
||||
$table->integer('amount')->default(0);
|
||||
$table->string('payment_system')->nullable();
|
||||
$table->string('transaction_id')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('order_id')->references('id')->on('orders');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('billings');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user