Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
luna de mierda
Browse files Browse the repository at this point in the history
  • Loading branch information
rats4final committed Nov 24, 2022
1 parent e8e04db commit 7530eaa
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
2 changes: 0 additions & 2 deletions database/migrations/2014_09_21_000000_create_users_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public function up()
$table->timestamp('email_verified_at')->nullable();
$table->string('password')->nullable();
$table->rememberToken();
$table->Integer('id_persona')->unsigned();
$table->foreign('id_persona')->references('id_persona')->on('personas');
$table->timestamps();
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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::table('users', function (Blueprint $table) {
$table->Integer('id_persona')->unsigned();
$table->foreign('id_persona')->references('id_persona')->on('personas');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn(array_merge([
'id_persona'
]));
});
}
};

0 comments on commit 7530eaa

Please sign in to comment.