diff --git a/database/migrations/2021_04_14_180125_add_ids_to_tables.php b/database/migrations/2021_04_14_180125_add_ids_to_tables.php new file mode 100644 index 0000000000..22cf03ebf9 --- /dev/null +++ b/database/migrations/2021_04_14_180125_add_ids_to_tables.php @@ -0,0 +1,54 @@ +increments('id'); + } + }); + + Schema::table('password_resets', function (Blueprint $table) { + // Add the id column to the password_resets table if it doesn't yet have one + if (!Schema::hasColumn('password_resets', 'id')) { + $table->increments('id'); + } + }); + + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('migrations', function (Blueprint $table) { + if (Schema::hasColumn('migrations', 'id')) { + $table->dropColumn('id'); + } + }); + + Schema::table('password_resets', function (Blueprint $table) { + if (Schema::hasColumn('password_resets', 'id')) { + $table->dropColumn('id'); + } + }); + } +}