feat: add Music Productions module with CRUD resources and frontend views
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?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('music_productions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title'); // Main title (usually default language)
|
||||
$table->string('slug')->unique();
|
||||
$table->string('cover_image')->nullable();
|
||||
$table->longText('content')->nullable(); // Main content (usually default language)
|
||||
$table->string('client_name')->nullable(); // Main client name (usually default language)
|
||||
$table->date('production_date')->nullable();
|
||||
$table->json('gallery')->nullable(); // Store gallery images
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->integer('sort_order')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['is_active', 'sort_order']);
|
||||
$table->index('slug');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('music_productions');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user