Initial commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user