|
|
@@ -0,0 +1,40 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
|
|
|
|
class CreateSuppliersTable extends Migration |
|
|
|
{ |
|
|
|
/** |
|
|
|
* Run the migrations. |
|
|
|
* |
|
|
|
* @return void |
|
|
|
*/ |
|
|
|
public function up() |
|
|
|
{ |
|
|
|
Schema::create('suppliers', function (Blueprint $table) { |
|
|
|
$table->id(); |
|
|
|
$table->timestamps(); |
|
|
|
$table->foreignId('service_id')->constrained(); |
|
|
|
$table->string('supplier')->nullable(); |
|
|
|
$table->string('supplier_name')->nullable(); |
|
|
|
$table->string('supplier_link')->nullable(); |
|
|
|
$table->integer('supplier_id')->nullable(); |
|
|
|
$table->integer('alternate_id')->nullable(); |
|
|
|
$table->integer('cost'); |
|
|
|
$table->integer('remaining')->nullable(); |
|
|
|
$table->text('description')->default(''); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Reverse the migrations. |
|
|
|
* |
|
|
|
* @return void |
|
|
|
*/ |
|
|
|
public function down() |
|
|
|
{ |
|
|
|
Schema::dropIfExists('suppliers'); |
|
|
|
} |
|
|
|
} |