45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('tarifas', function (Blueprint $table) {
|
|
$table->id();
|
|
|
|
$table -> string('pantallas')->nullable();
|
|
$table -> string('dias')->nullable();
|
|
$table -> string('valor')->nullable();
|
|
$table -> string('estado')->nullable();
|
|
$table->unsignedBigInteger('servicio_id')->nullable();
|
|
|
|
$table->foreign('servicio_id')
|
|
->references('id')
|
|
->on('servicios')
|
|
->onDelete('cascade')
|
|
->onUpdate('cascade');
|
|
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('tarifas');
|
|
}
|
|
};
|