Update
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
<?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::table('meme_medias', function (Blueprint $table) {
|
||||
$table->double('duration')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('meme_medias', function (Blueprint $table) {
|
||||
$table->dropColumn('duration');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
<?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::table('meme_medias', function (Blueprint $table) {
|
||||
$table->integer('media_width')->default(720);
|
||||
$table->integer('media_height')->default(1280);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('meme_medias', function (Blueprint $table) {
|
||||
$table->dropColumn('media_width');
|
||||
$table->dropColumn('media_height');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
<?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::table('background_medias', function (Blueprint $table) {
|
||||
$table->integer('media_width')->default(720);
|
||||
$table->integer('media_height')->default(720);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('background_medias', function (Blueprint $table) {
|
||||
$table->dropColumn('media_width');
|
||||
$table->dropColumn('media_height');
|
||||
});
|
||||
}
|
||||
};
|
||||
36
database/migrations/2025_06_19_002713_create_tag_tables.php
Normal file
36
database/migrations/2025_06_19_002713_create_tag_tables.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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
|
||||
{
|
||||
Schema::create('tags', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->json('name');
|
||||
$table->json('slug');
|
||||
$table->string('type')->nullable();
|
||||
$table->integer('order_column')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('taggables', function (Blueprint $table) {
|
||||
$table->foreignId('tag_id')->constrained()->cascadeOnDelete();
|
||||
|
||||
$table->morphs('taggable');
|
||||
|
||||
$table->unique(['tag_id', 'taggable_id', 'taggable_type']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('taggables');
|
||||
Schema::dropIfExists('tags');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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('categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->boolean('is_enabled')->default(false);
|
||||
$table->string('name');
|
||||
$table->text('description');
|
||||
$table->vector('embedding', 384);
|
||||
|
||||
// Nested set model columns (Kalnoy NestedSet)
|
||||
$table->nestedSet();
|
||||
|
||||
// Nullable columns for category/subcategory-specific fields
|
||||
$table->json('subcategories')->nullable();
|
||||
$table->json('meme_angles')->nullable();
|
||||
$table->json('sample_captions')->nullable();
|
||||
$table->json('keywords')->nullable();
|
||||
|
||||
// Store original JSON payload
|
||||
$table->json('payload');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('categories');
|
||||
}
|
||||
};
|
||||
@@ -13,12 +13,13 @@ public function up(): void
|
||||
{
|
||||
Schema::create('meme_medias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->boolean('is_enabled')->default(false);
|
||||
$table->string('original_id');
|
||||
$table->enum('type', ['video', 'image']);
|
||||
$table->enum('sub_type', ['background', 'overlay']);
|
||||
$table->string('name');
|
||||
$table->text('description');
|
||||
$table->string('keywords');
|
||||
$table->json('keywords');
|
||||
$table->uuid('mov_uuid');
|
||||
$table->uuid('webm_uuid');
|
||||
$table->uuid('gif_uuid');
|
||||
@@ -28,6 +29,9 @@ public function up(): void
|
||||
$table->string('gif_url');
|
||||
$table->string('webp_url');
|
||||
$table->vector('embedding', 384)->nullable();
|
||||
$table->double('duration')->nullable();
|
||||
$table->integer('media_width')->default(720);
|
||||
$table->integer('media_height')->default(1280);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
@@ -13,19 +13,20 @@ public function up(): void
|
||||
{
|
||||
Schema::create('background_medias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('list_type');
|
||||
$table->enum('area', ['interior', 'exterior']);
|
||||
$table->string('location_name');
|
||||
$table->text('prompt')->nullable();
|
||||
$table->enum('status', ['pending_media', 'completed'])->default('pending_media');
|
||||
$table->uuid('media_uuid')->nullable();
|
||||
$table->string('media_url')->nullable();
|
||||
$table->vector('embedding', 384)->nullable();
|
||||
$table->integer('media_width');
|
||||
$table->integer('media_height');
|
||||
$table->enum('aspect_ratio', ['9:16', '16:9', '1:1']);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
Reference in New Issue
Block a user