From f6dc795098ef5b4e98a90a7264fa52fea5f26ccb Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 17 Jul 2018 18:05:22 -0600 Subject: [PATCH] Add 2FA migration --- ...18_07_15_011916_add_2fa_to_users_table.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 database/migrations/2018_07_15_011916_add_2fa_to_users_table.php diff --git a/database/migrations/2018_07_15_011916_add_2fa_to_users_table.php b/database/migrations/2018_07_15_011916_add_2fa_to_users_table.php new file mode 100644 index 000000000..ad77b5c60 --- /dev/null +++ b/database/migrations/2018_07_15_011916_add_2fa_to_users_table.php @@ -0,0 +1,38 @@ +boolean('2fa_enabled')->default(false); + $table->string('2fa_secret')->nullable(); + $table->json('2fa_backup_codes')->nullable(); + $table->timestamp('2fa_setup_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('2fa_enabled'); + $table->dropColumn('2fa_secret'); + $table->dropColumn('2fa_backup_codes'); + $table->dropColumn('2fa_setup_at'); + }); + } +}