Feature: Creating Migration For Adding Pricing Mode to Shipping Rates
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$prefix = config('lunar.database.table_prefix');
|
||||||
|
|
||||||
|
Schema::table("{$prefix}shipping_rates", function (Blueprint $table) {
|
||||||
|
$table->string('pricing_mode')->default('live')->after('enabled');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
$prefix = config('lunar.database.table_prefix');
|
||||||
|
|
||||||
|
Schema::table("{$prefix}shipping_rates", function (Blueprint $table) {
|
||||||
|
$table->dropColumn('pricing_mode');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user