refactor: changed theme_group relationship name and removed group field (#664)

This commit is contained in:
Kyrch
2024-04-30 20:56:38 -03:00
committed by GitHub
parent 811e8672e3
commit 1744b5457a
32 changed files with 103 additions and 138 deletions
@@ -100,7 +100,30 @@ final class CreateEntryIndex implements MigrationInterface
'type' => 'date',
],
'group' => [
'type' => 'text',
'type' => 'nested',
'properties' => [
'created_at' => [
'type' => 'date',
],
'group_id' => [
'type' => 'long',
],
'name' => [
'type' => 'text',
],
'slug' => [
'type' => 'text',
],
'video_filename' => [
'type' => 'text',
],
'updated_at' => [
'type' => 'date',
],
],
],
'group_id' => [
'type' => 'long',
],
'sequence' => [
'type' => 'long',
@@ -73,13 +73,29 @@ final class CreateThemeIndex implements MigrationInterface
$mapping->long('anime_id');
$mapping->text('anime_slug');
$mapping->date('created_at');
$mapping->text('group', [
'fields' => [
'keyword' => [
'type' => 'keyword',
$mapping->nested('group', [
'properties' => [
'created_at' => [
'type' => 'date',
],
'group_id' => [
'type' => 'long',
],
'name' => [
'type' => 'text',
],
'slug' => [
'type' => 'text',
],
'video_filename' => [
'type' => 'text',
],
'updated_at' => [
'type' => 'date',
],
],
]);
$mapping->long('group_id');
$mapping->long('sequence');
$mapping->text('slug', [
'copy_to' => [
@@ -110,7 +110,30 @@ final class CreateVideoIndex implements MigrationInterface
'type' => 'date',
],
'group' => [
'type' => 'text',
'type' => 'nested',
'properties' => [
'created_at' => [
'type' => 'date',
],
'group_id' => [
'type' => 'long',
],
'name' => [
'type' => 'text',
],
'slug' => [
'type' => 'text',
],
'video_filename' => [
'type' => 'text',
],
'updated_at' => [
'type' => 'date',
],
],
],
'group_id' => [
'type' => 'long',
],
'sequence' => [
'type' => 'long',