Files
approagency/database/migrations/2025_11_25_144031_create_promotions_table.php
2026-06-10 08:30:03 +00:00

50 lines
1.2 KiB
PHP
Executable File

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('promotions', function (Blueprint $table) {
$table->id();
$table->string('type'); // slider, action, paid_app, banner
$table->string('title')->nullable();
$table->string('subtitle')->nullable();
$table->string('image')->nullable();
// action labels
$table->string('action_text')->nullable();
// platform-specific URLs
$table->string('url_myket')->nullable();
$table->string('url_bazzar')->nullable();
$table->string('url_google_play')->nullable();
$table->string('url_site')->nullable();
$table->boolean('is_active')->default(true);
$table->integer('priority')->default(0);
$table->timestamp('start_at')->nullable();
$table->timestamp('end_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('promotions');
}
};