File: /var/www/ipsremont-demo/database/migrations/2021_01_19_004427_create_service_prices_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateServicePricesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('service_prices', function (Blueprint $table) {
$table->id();
$table->timestamp('created_at')->nullable()->useCurrent();
$table->timestamp('updated_at')->nullable()->useCurrent();
$table->unsignedBigInteger('service_id');
$table->smallInteger('category_id');
$table->double('price', 9,2)->comment('Цена')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('service_prices');
}
}