From 7530eaa54340e57b17d7c26cf1b1022e61adf7ac Mon Sep 17 00:00:00 2001 From: rats4final Date: Thu, 24 Nov 2022 00:48:02 -0400 Subject: [PATCH] luna de mierda --- .../2014_09_21_000000_create_users_table.php | 2 -- ...1_add_id_persona_columm_to_users_table.php | 35 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 database/migrations/2022_11_24_044401_add_id_persona_columm_to_users_table.php diff --git a/database/migrations/2014_09_21_000000_create_users_table.php b/database/migrations/2014_09_21_000000_create_users_table.php index fb98a62..9ccb00f 100644 --- a/database/migrations/2014_09_21_000000_create_users_table.php +++ b/database/migrations/2014_09_21_000000_create_users_table.php @@ -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(); }); } diff --git a/database/migrations/2022_11_24_044401_add_id_persona_columm_to_users_table.php b/database/migrations/2022_11_24_044401_add_id_persona_columm_to_users_table.php new file mode 100644 index 0000000..179ab4b --- /dev/null +++ b/database/migrations/2022_11_24_044401_add_id_persona_columm_to_users_table.php @@ -0,0 +1,35 @@ +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' + ])); + }); + } +};