import { Migration } from '@mikro-orm/migrations'; export class Migration20260409060704 extends Migration { override async up(): Promise { this.addSql(`create index "field_entity_id_index" on "field" ("entity_id");`); this.addSql(`create index "field_option_field_id_index" on "field_option" ("field_id");`); this.addSql(`create index "admins_phone_index" on "admins" ("phone");`); this.addSql(`create index "role_permissions_role_id_index" on "role_permissions" ("role_id");`); this.addSql(`create index "users_phone_index" on "users" ("phone");`); this.addSql(`create index "tickets_user_id_index" on "tickets" ("user_id");`); this.addSql(`create index "request_items_request_id_index" on "request_items" ("request_id");`); this.addSql(`create index "notifications_user_id_index" on "notifications" ("user_id");`); this.addSql(`create index "invoice_items_invoice_id_index" on "invoice_items" ("invoice_id");`); this.addSql(`create index "orders_status_index" on "orders" ("status");`); this.addSql(`create index "orders_designer_id_index" on "orders" ("designer_id");`); this.addSql(`create index "chat_user_id_index" on "chat" ("user_id");`); } override async down(): Promise { this.addSql(`drop index "field_entity_id_index";`); this.addSql(`drop index "field_option_field_id_index";`); this.addSql(`drop index "admins_phone_index";`); this.addSql(`drop index "role_permissions_role_id_index";`); this.addSql(`drop index "users_phone_index";`); this.addSql(`drop index "tickets_user_id_index";`); this.addSql(`drop index "request_items_request_id_index";`); this.addSql(`drop index "notifications_user_id_index";`); this.addSql(`drop index "invoice_items_invoice_id_index";`); this.addSql(`drop index "orders_status_index";`); this.addSql(`drop index "orders_designer_id_index";`); this.addSql(`drop index "chat_user_id_index";`); } }