change gift-card
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?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
|
||||
{
|
||||
if (Schema::hasTable('giftcards') && ! Schema::hasColumn('giftcards', 'show_in_app')) {
|
||||
Schema::table('giftcards', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('show_in_app')->default(0)->after('use_once');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
// ستون ممکن است روی نصبهای قدیمی استفاده شود؛ drop نمیکنیم.
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user