60 lines
1.8 KiB
PHP
60 lines
1.8 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
|
|
{
|
|
|
|
// {#488 ▼ // app/Http/Controllers/TestController.php:24
|
|
// +"caption": "thesis writing procrastination blues"
|
|
// +"meme_keywords": array:3 [▼
|
|
// 0 => "anxiety"
|
|
// 1 => "overwhelm"
|
|
// 2 => "imposter syndrome"
|
|
// ]
|
|
// +"background": "cluttered desk with piles of papers and a laptop"
|
|
// +"keywords": array:3 [▼
|
|
// 0 => "thesis"
|
|
// 1 => "anxiety"
|
|
// 2 => "breaks"
|
|
// ]
|
|
// }
|
|
Schema::create('memes', function (Blueprint $table) {
|
|
$table->id();
|
|
|
|
$table->enum('type', ['single_caption_meme_background'])->default('single_caption_meme_background');
|
|
$table->boolean('is_system');
|
|
|
|
$table->foreignId('category_id')->nullable();
|
|
$table->foreignId('user_id')->nullable();
|
|
$table->foreignId('meme_id')->nullable();
|
|
$table->foreignId('background_id')->nullable();
|
|
|
|
$table->enum('status', ['pending', 'completed'])->default('pending');
|
|
$table->text('prompt');
|
|
$table->string('caption')->nullable();
|
|
$table->json('meme_keywords')->nullable();
|
|
$table->string('background')->nullable();
|
|
$table->json('keywords');
|
|
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('memes');
|
|
}
|
|
};
|