From be05a8aae9ec4b3027c47b37a3628abdfeda6d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gro=C3=9Fe?= Date: Thu, 2 Jan 2020 15:45:25 +0100 Subject: [PATCH] add missing api_token columns to database (table users and admins) --- ...020_01_02_201029_add_api_token_columns.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 packages/Webkul/Core/src/Database/Migrations/2020_01_02_201029_add_api_token_columns.php diff --git a/packages/Webkul/Core/src/Database/Migrations/2020_01_02_201029_add_api_token_columns.php b/packages/Webkul/Core/src/Database/Migrations/2020_01_02_201029_add_api_token_columns.php new file mode 100644 index 000000000..0373c050d --- /dev/null +++ b/packages/Webkul/Core/src/Database/Migrations/2020_01_02_201029_add_api_token_columns.php @@ -0,0 +1,52 @@ +string('api_token', 80) + ->after('password') + ->unique() + ->nullable() + ->default(null); + }); + + Schema::table('admins', function ($table) { + $table + ->string('api_token', 80) + ->after('password') + ->unique() + ->nullable() + ->default(null); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('api_token'); + }); + + Schema::table('admins', function (Blueprint $table) { + $table->dropColumn('api_token'); + }); + } +}