wip: article AI polish, category SEO fields, cover generator, membership plan seeder
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
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::table('articles', function (Blueprint $table): void {
|
||||
if (! Schema::hasColumn('articles', 'ai_polished_content')) {
|
||||
$table->longText('ai_polished_content')->nullable()->after('ai_suggestions');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('articles', function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('articles', 'ai_polished_content')) {
|
||||
$table->dropColumn('ai_polished_content');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
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::table('categories', function (Blueprint $table): void {
|
||||
$table->string('description')->nullable()->after('name');
|
||||
$table->text('intro')->nullable()->after('description');
|
||||
$table->string('keywords')->nullable()->after('intro');
|
||||
$table->string('cover_path')->nullable()->after('keywords');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('categories', function (Blueprint $table): void {
|
||||
$table->dropColumn(['description', 'intro', 'keywords', 'cover_path']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user