Update (keywords): new logic
This commit is contained in:
@@ -14,7 +14,7 @@ public function up(): void
|
||||
Schema::create('rss_post_keywords', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('rss_post_id');
|
||||
$table->enum('type',['keyword','entity']);
|
||||
$table->enum('type', ['keyword', 'entity']);
|
||||
$table->boolean('is_main')->default(false);
|
||||
$table->string('value');
|
||||
$table->string('value_lowercased');
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('rss_posts', function (Blueprint $table) {
|
||||
$table->boolean('keyword_saved')->default(false);
|
||||
$table->boolean('keyword_saved')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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('rss_post_keywords', function (Blueprint $table) {
|
||||
$table->index('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('rss_post_keywords', function (Blueprint $table) {
|
||||
$table->dropIndex(['created_at']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user