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