Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Added name, email and password in shops table migration if its missing from current shops table #1209

Merged
merged 14 commits into from
Sep 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ public function up(): void
$table->softDeletes();
}

if (! Schema::hasColumn(Util::getShopsTable(), 'name')) {
$table->string('name')->nullable();
}

if (! Schema::hasColumn(Util::getShopsTable(), 'email')) {
$table->string('email')->nullable();
}

if (! Schema::hasColumn(Util::getShopsTable(), 'password')) {
$table->string('password', 100)->nullable();
}

$table->foreign('plan_id')->references('id')->on(Util::getShopifyConfig('table_names.plans', 'plans'));
});
}
Expand All @@ -38,6 +50,9 @@ public function down(): void
Schema::table(Util::getShopsTable(), function (Blueprint $table) {
$table->dropForeign(Util::getShopsTable().'_plan_id_foreign');
$table->dropColumn([
'name',
'email',
'password',
'shopify_grandfathered',
'shopify_namespace',
'shopify_freemium',
Expand Down