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' + ])); + }); + } +};