diff --git a/packages/Webkul/Product/src/Database/Migrations/2019_05_23_113407_add_remaining_column_in_product_flat_table.php b/packages/Webkul/Product/src/Database/Migrations/2019_05_23_113407_add_remaining_column_in_product_flat_table.php index 29cdeadd0..9e16cc870 100644 --- a/packages/Webkul/Product/src/Database/Migrations/2019_05_23_113407_add_remaining_column_in_product_flat_table.php +++ b/packages/Webkul/Product/src/Database/Migrations/2019_05_23_113407_add_remaining_column_in_product_flat_table.php @@ -14,13 +14,27 @@ class AddRemainingColumnInProductFlatTable extends Migration public function up() { Schema::table('product_flat', function (Blueprint $table) { - $table->text('short_description')->nullable(); - $table->text('meta_title')->nullable(); - $table->text('meta_keywords')->nullable(); - $table->text('meta_description')->nullable(); - $table->decimal('width', 12, 4)->nullable(); - $table->decimal('height', 12, 4)->nullable(); - $table->decimal('depth', 12, 4)->nullable(); + if (! Schema::hasColumn('product_flat', 'short_description')) { + $table->text('short_description')->nullable(); + } + if (! Schema::hasColumn('product_flat', 'meta_title')) { + $table->text('meta_title')->nullable(); + } + if (! Schema::hasColumn('product_flat', 'meta_keywords')) { + $table->text('meta_keywords')->nullable(); + } + if (! Schema::hasColumn('product_flat', 'meta_description')) { + $table->text('meta_description')->nullable(); + } + if (! Schema::hasColumn('product_flat', 'width')) { + $table->decimal('width', 12, 4)->nullable(); + } + if (! Schema::hasColumn('product_flat', 'height')) { + $table->decimal('height', 12, 4)->nullable(); + } + if (! Schema::hasColumn('product_flat', 'depth')) { + $table->decimal('depth', 12, 4)->nullable(); + } }); } @@ -32,13 +46,7 @@ class AddRemainingColumnInProductFlatTable extends Migration public function down() { Schema::table('product_flat', function (Blueprint $table) { - $table->dropColumn('short_description'); - $table->dropColumn('meta_title'); - $table->dropColumn('meta_keywords'); - $table->dropColumn('meta_description'); - $table->dropColumn('width', 12, 4); - $table->dropColumn('height', 12, 4); - $table->dropColumn('depth', 12, 4); + }); } -} +} \ No newline at end of file diff --git a/packages/Webkul/User/src/Http/Controllers/SessionController.php b/packages/Webkul/User/src/Http/Controllers/SessionController.php index f5125e86c..e9a5e13d5 100755 --- a/packages/Webkul/User/src/Http/Controllers/SessionController.php +++ b/packages/Webkul/User/src/Http/Controllers/SessionController.php @@ -5,6 +5,7 @@ namespace Webkul\User\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Http\Response; use Auth; +use File; /** * Admin user session controller @@ -42,6 +43,10 @@ class SessionController extends Controller */ public function create() { + if (File::exists(public_path('installer'))) { + File::deleteDirectory(public_path('installer')); + } + if (auth()->guard('admin')->check()) { return redirect()->route('admin.dashboard.index'); } else { diff --git a/public/index.php b/public/index.php index ea2ec077f..128cf2cf5 100755 --- a/public/index.php +++ b/public/index.php @@ -1,8 +1,17 @@