50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?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');
|
|
}
|
|
};
|