Feat/index sync data (#11169)
**what** Synchronisation process implementation for configured entity to be indexed
This commit is contained in:
committed by
GitHub
parent
5093224914
commit
ea402875a5
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"namespaces": [
|
||||
"public"
|
||||
],
|
||||
"namespaces": ["public"],
|
||||
"name": "public",
|
||||
"tables": [
|
||||
{
|
||||
@@ -108,10 +106,7 @@
|
||||
},
|
||||
{
|
||||
"keyName": "index_data_pkey",
|
||||
"columnNames": [
|
||||
"id",
|
||||
"name"
|
||||
],
|
||||
"columnNames": ["id", "name"],
|
||||
"composite": true,
|
||||
"constraint": true,
|
||||
"primary": true,
|
||||
@@ -168,12 +163,7 @@
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "'pending'",
|
||||
"enumItems": [
|
||||
"pending",
|
||||
"processing",
|
||||
"done",
|
||||
"error"
|
||||
],
|
||||
"enumItems": ["pending", "processing", "done", "error"],
|
||||
"mappedType": "enum"
|
||||
},
|
||||
"created_at": {
|
||||
@@ -232,9 +222,7 @@
|
||||
},
|
||||
{
|
||||
"keyName": "index_metadata_pkey",
|
||||
"columnNames": [
|
||||
"id"
|
||||
],
|
||||
"columnNames": ["id"],
|
||||
"composite": false,
|
||||
"constraint": true,
|
||||
"primary": true,
|
||||
@@ -366,9 +354,7 @@
|
||||
},
|
||||
{
|
||||
"keyName": "index_relation_pkey",
|
||||
"columnNames": [
|
||||
"id"
|
||||
],
|
||||
"columnNames": ["id"],
|
||||
"composite": false,
|
||||
"constraint": true,
|
||||
"primary": true,
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20250127105159 extends Migration {
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(
|
||||
`alter table if exists "index_relation" alter column "id" set not null;`
|
||||
)
|
||||
this.addSql(
|
||||
`alter table if exists "index_relation" add constraint "IDX_index_relation_id_pivot_parent_name_child_name_parent_id_child_id_unique" unique ("parent_id", "child_id", "child_name", "parent_name", "pivot");`
|
||||
)
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(
|
||||
`alter table if exists "index_relation" drop constraint "IDX_index_relation_id_pivot_parent_name_child_name_parent_id_child_id_unique";`
|
||||
)
|
||||
this.addSql(
|
||||
`alter table if exists "index_relation" alter column "id" drop not null;`
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user