Initial commit
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?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('cuentas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table -> string('correo')->nullable();
|
||||
$table -> string('password')->nullable();
|
||||
$table -> string('vencimiento')->nullable();
|
||||
$table -> string('estado')->nullable();
|
||||
|
||||
$table->unsignedBigInteger('tarifa_id')->nullable();
|
||||
|
||||
$table->foreign('tarifa_id')
|
||||
->references('id')
|
||||
->on('tarifas')
|
||||
->onDelete('cascade')
|
||||
->onUpdate('cascade');
|
||||
|
||||
$table->unsignedBigInteger('promocion_id')->nullable();
|
||||
|
||||
$table->foreign('promocion_id')
|
||||
->references('id')
|
||||
->on('promociones')
|
||||
->onDelete('cascade')
|
||||
->onUpdate('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('cuentas');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user