import { MigrationInterface, QueryRunner } from "typeorm";

export class InitialSchema1780721550917 implements MigrationInterface {
    name = 'InitialSchema1780721550917'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`CREATE TABLE \`owner\` (\`id\` varchar(36) NOT NULL, \`name\` varchar(191) NOT NULL, \`email\` varchar(191) NOT NULL, \`username\` varchar(191) NOT NULL, \`password\` varchar(191) NOT NULL, \`address\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`phone\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`image\` json NOT NULL, \`role\` enum ('owner', 'admin', 'member') NOT NULL DEFAULT 'owner', \`otp\` varchar(191) NULL, \`status\` enum ('active', 'inactive', 'unverified') NOT NULL DEFAULT 'unverified', \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), UNIQUE INDEX \`IDX_432373de5f77bd0786e7b912ad\` (\`username\`), UNIQUE INDEX \`IDX_7431bbd2e694ee4a80c32bd7ef\` (\`email\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`company\` (\`id\` varchar(36) NOT NULL, \`name\` varchar(191) NOT NULL, \`company_code\` varchar(191) NOT NULL, \`email\` varchar(191) NOT NULL, \`phone\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`address\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`website\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`logo\` json NOT NULL, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`founded_at\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`industry\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`status\` enum ('active', 'inactive', 'deleted') NOT NULL DEFAULT 'active', \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), UNIQUE INDEX \`IDX_0c6ea8a32565efcb512e572d61\` (\`owner_id\`), UNIQUE INDEX \`REL_0c6ea8a32565efcb512e572d61\` (\`owner_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`working_schedule\` (\`id\` varchar(36) NOT NULL, \`working_days\` json NOT NULL, \`working_days_per_week\` int NOT NULL DEFAULT '5', \`working_hours_per_day\` float NOT NULL DEFAULT '8', \`office_start_time\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`office_end_time\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`half_day_min_time\` int NOT NULL DEFAULT '4', \`half_day_max_time\` int NOT NULL DEFAULT '6', \`owner_id\` varchar(191) NOT NULL, \`status\` enum ('active', 'inactive', 'deleted') NOT NULL DEFAULT 'active', \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), UNIQUE INDEX \`IDX_2814f05e73089b95f0a7e9bc58\` (\`owner_id\`), UNIQUE INDEX \`REL_2814f05e73089b95f0a7e9bc58\` (\`owner_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`leave_policy\` (\`id\` varchar(36) NOT NULL, \`annual_leave_days\` int NOT NULL DEFAULT '0', \`sick_leave_days\` int NOT NULL DEFAULT '0', \`casual_leave_days\` int NOT NULL DEFAULT '0', \`maternity_leave_days\` int NOT NULL DEFAULT '0', \`paternity_leave_days\` int NOT NULL DEFAULT '0', \`personal_leave_days\` int NOT NULL DEFAULT '0', \`compensatory_leave_days\` int NOT NULL DEFAULT '0', \`unpaid_leave_days\` int NOT NULL DEFAULT '0', \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), UNIQUE INDEX \`IDX_e8665e3b253027261a8af24945\` (\`owner_id\`), UNIQUE INDEX \`REL_e8665e3b253027261a8af24945\` (\`owner_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`departments\` (\`id\` varchar(36) NOT NULL, \`name\` varchar(191) NOT NULL, \`department_code\` varchar(191) NOT NULL, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`department_head_id\` varchar(191) NULL, \`status\` enum ('active', 'inactive', 'deleted') NOT NULL DEFAULT 'active', \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), \`owner_id\` varchar(191) NOT NULL, UNIQUE INDEX \`IDX_200f04e4849cb794d547b6983a\` (\`department_head_id\`), UNIQUE INDEX \`IDX_2615e819c892a91466151eaf85\` (\`owner_id\`, \`department_code\`), UNIQUE INDEX \`REL_200f04e4849cb794d547b6983a\` (\`department_head_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`designations\` (\`id\` varchar(36) NOT NULL, \`name\` varchar(191) NOT NULL, \`designation_code\` varchar(191) NOT NULL, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`status\` enum ('active', 'inactive', 'deleted') NOT NULL DEFAULT 'active', \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), UNIQUE INDEX \`IDX_d3970466236f7016e1327ac094\` (\`owner_id\`, \`designation_code\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`locations\` (\`id\` varchar(36) NOT NULL, \`name\` varchar(191) NOT NULL, \`location_code\` varchar(191) NOT NULL, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`status\` enum ('active', 'inactive', 'deleted') NOT NULL DEFAULT 'active', \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), UNIQUE INDEX \`IDX_275f339962b95cdaff7ee256af\` (\`owner_id\`, \`location_code\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`employement_types\` (\`id\` varchar(36) NOT NULL, \`name\` varchar(191) NOT NULL, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`status\` enum ('active', 'inactive', 'deleted') NOT NULL DEFAULT 'active', \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`hiring_sources\` (\`id\` varchar(36) NOT NULL, \`name\` varchar(191) NOT NULL, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`status\` enum ('active', 'inactive', 'deleted') NOT NULL DEFAULT 'active', \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), UNIQUE INDEX \`IDX_5a2ebba743fbfe34b1e3c8484e\` (\`owner_id\`, \`name\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`events\` (\`id\` varchar(36) NOT NULL, \`title\` varchar(191) NOT NULL, \`image\` json NOT NULL, \`category\` enum ('meeting', 'celebration', 'training', 'workshop', 'other') NOT NULL DEFAULT 'meeting', \`date\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`start_time\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`end_time\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`location\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`attendees\` int NOT NULL DEFAULT '0', \`event_owner\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), INDEX \`IDX_918130b4f882fda431503d6f4e\` (\`owner_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`notices\` (\`id\` varchar(36) NOT NULL, \`title\` varchar(191) NOT NULL, \`content\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`document\` json NOT NULL, \`status\` enum ('draft', 'published', 'archived') NOT NULL DEFAULT 'published', \`priority\` enum ('low', 'medium', 'high', 'critical') NOT NULL DEFAULT 'medium', \`created_by\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`published_at\` datetime NULL, \`expire_at\` datetime NULL, \`is_pinned\` tinyint NOT NULL DEFAULT 0, \`required_acknowledgment\` tinyint NOT NULL DEFAULT 0, \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), INDEX \`IDX_6e8f4aeffb70eff67e72c792ea\` (\`owner_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`members\` (\`id\` varchar(36) NOT NULL, \`email\` varchar(191) NOT NULL, \`work_email\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`employee_id\` varchar(191) NOT NULL, \`image\` json NOT NULL, \`nickname\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`first_name\` varchar(191) NOT NULL, \`last_name\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`password\` varchar(191) NOT NULL, \`about\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`expertise\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`work_phone\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`phone\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`father_name\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`mother_name\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`emergency_contact_name\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`emergency_contact_phone\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`emergency_contact_relationship\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`role\` enum ('owner', 'admin', 'member') NOT NULL DEFAULT 'member', \`marital_status\` enum ('single', 'married', 'divorced', 'widowed') NOT NULL DEFAULT 'single', \`present_address_line_one\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`present_address_line_two\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`present_address_city\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`present_address_country\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`present_address_state\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`present_address_zip_code\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`permanent_address_line_one\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`permanent_address_line_two\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`permanent_address_city\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`permanent_address_country\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`permanent_address_state\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`permanent_address_zip_code\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`gender\` enum ('male', 'female', 'others') NOT NULL DEFAULT 'male', \`date_of_birth\` datetime NULL, \`date_of_joining\` datetime NULL DEFAULT CURRENT_TIMESTAMP, \`department_id\` varchar(191) NULL, \`designation_id\` varchar(191) NULL, \`location_id\` varchar(191) NULL, \`employment_type_id\` varchar(191) NULL, \`hiring_source_id\` varchar(191) NULL, \`reporting_manager_id\` varchar(191) NULL, \`status\` enum ('active', 'deactivated', 'terminated', 'deceased', 'resigned', 'deleted') NOT NULL DEFAULT 'active', \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), \`eventsId\` varchar(191) NULL, \`owner_id\` varchar(191) NOT NULL, \`noticesId\` varchar(191) NULL, INDEX \`IDX_764bf7ff2544b85cf1a8298d03\` (\`owner_id\`), INDEX \`IDX_d75eefa29c161d6add2a30a10e\` (\`status\`), INDEX \`IDX_6259d4592d7c24fca9fb21f793\` (\`reporting_manager_id\`), INDEX \`IDX_aae2956f6114f0dd9fbe76e567\` (\`hiring_source_id\`), INDEX \`IDX_a595b5a2db232be2233684ca05\` (\`employment_type_id\`), INDEX \`IDX_a9e0bf4c88d3885191d5385022\` (\`location_id\`), INDEX \`IDX_62933351fdb38047703e3b8d1e\` (\`designation_id\`), INDEX \`IDX_3eee8d9bac20dbabce411c52f4\` (\`department_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`work_experiences\` (\`id\` varchar(36) NOT NULL, \`member_id\` varchar(191) NOT NULL, \`company\` varchar(191) NOT NULL, \`position\` varchar(191) NOT NULL, \`start_date\` datetime NOT NULL, \`end_date\` datetime NULL, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`relevant\` tinyint NOT NULL DEFAULT 0, \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), INDEX \`IDX_38e7588937c7ca136acf8a3a3b\` (\`owner_id\`), INDEX \`IDX_53673af6504eca1ce63e62b22a\` (\`member_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`educations\` (\`id\` varchar(36) NOT NULL, \`member_id\` varchar(191) NOT NULL, \`institution\` varchar(191) NOT NULL, \`degree\` varchar(191) NOT NULL, \`field\` varchar(191) NOT NULL, \`start_date\` datetime NOT NULL, \`end_date\` datetime NULL, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`relevant\` tinyint NOT NULL DEFAULT 0, \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), INDEX \`IDX_b468e7e6265a4464c58c55b965\` (\`owner_id\`), INDEX \`IDX_374560373a83e332f78def538c\` (\`member_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`attendance_breaks\` (\`id\` varchar(36) NOT NULL, \`attendance_id\` varchar(191) NOT NULL, \`break_start\` datetime NOT NULL, \`break_end\` datetime NULL, \`note\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`owner_id\` varchar(191) NOT NULL, \`break_reminder_sent\` tinyint NOT NULL DEFAULT 0, \`break_reminder_sent_at\` timestamp NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), INDEX \`IDX_0edf01e362647cf09a71ba4518\` (\`owner_id\`), INDEX \`IDX_7d586d438d8b2123fa160827ba\` (\`attendance_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`attendances\` (\`id\` varchar(36) NOT NULL, \`member_id\` varchar(191) NOT NULL, \`date\` datetime NOT NULL, \`type\` enum ('in_office', 'flexible', 'on_leave') NOT NULL DEFAULT 'in_office', \`check_in\` datetime NULL, \`check_out\` datetime NULL, \`lunch_start\` datetime NULL, \`lunch_end\` datetime NULL, \`work_hours\` float NULL DEFAULT '0', \`total_break_hours\` float NULL DEFAULT '0', \`overtime_hours\` float NULL DEFAULT '0', \`location_id\` varchar(191) NULL, \`note\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`status\` enum ('present', 'absent', 'late', 'half_day', 'on_leave', 'remote', 'check_in', 'on_break', 'holiday', 'weekend') NOT NULL DEFAULT 'present', \`checkout_reminder_sent\` tinyint NOT NULL DEFAULT 0, \`checkout_reminder_sent_at\` timestamp NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), \`owner_id\` varchar(191) NOT NULL, INDEX \`IDX_b47acfc6e4d108d060e7b9c16a\` (\`owner_id\`), INDEX \`IDX_4fa5236dedf60886a5d2099e92\` (\`location_id\`), INDEX \`IDX_2356832877cbc5cf26aca84e19\` (\`member_id\`), UNIQUE INDEX \`IDX_4dae00a2b57f002bb7e2163205\` (\`member_id\`, \`date\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`leaves\` (\`id\` varchar(36) NOT NULL, \`member_id\` varchar(191) NOT NULL, \`start_date\` datetime NOT NULL, \`end_date\` datetime NOT NULL, \`leave_type\` enum ('annual', 'sick', 'casual', 'maternity', 'paternity', 'personal', 'compensatory', 'unpaid') NOT NULL DEFAULT 'annual', \`reason\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`owner_id\` varchar(191) NOT NULL, \`status\` enum ('pending', 'approved', 'rejected', 'cancelled') NOT NULL DEFAULT 'pending', \`approver_type\` varchar(191) NULL, \`approver_owner_id\` varchar(191) NULL, \`approver_member_id\` varchar(191) NULL, \`approved_at\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), INDEX \`IDX_c37c05ad776088b265793ecb9c\` (\`approver_member_id\`), INDEX \`IDX_6c9e43bf1012677777c1d8de6a\` (\`approver_owner_id\`), INDEX \`IDX_7d93f1b2454bf8b4ee0fc58c50\` (\`owner_id\`), INDEX \`IDX_4c5cbdf59315fddae800bc0d54\` (\`member_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`holidays\` (\`id\` varchar(36) NOT NULL, \`name\` varchar(191) NOT NULL, \`holiday_type\` enum ('public', 'company', 'optional', 'religious', 'regional', 'observance', 'other') NOT NULL DEFAULT 'public', \`start_date\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`end_date\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`is_recurring\` tinyint NOT NULL DEFAULT 0, \`description\` varchar(191) NOT NULL DEFAULT 'NT/APL', \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), \`updated_at\` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), INDEX \`IDX_1ef09ffe0cbce46bc8847a31d6\` (\`owner_id\`), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`notifications\` (\`id\` varchar(36) NOT NULL, \`title\` varchar(191) NOT NULL, \`message\` text NOT NULL, \`start_time\` datetime NOT NULL, \`end_time\` datetime NOT NULL, \`duration\` float NULL DEFAULT '0', \`source_id\` varchar(191) NULL, \`type\` enum ('HOLIDAY', 'NOTICE', 'LEAVE', 'ATTENDANCE') NOT NULL, \`meta\` json NULL, \`owner_id\` varchar(191) NOT NULL, \`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`notification_targets\` (\`id\` varchar(36) NOT NULL, \`notification_id\` varchar(255) NOT NULL, \`target_type\` enum ('MEMBER', 'DEPARTMENT', 'ROLE', 'ALL') NOT NULL, \`target_value\` json NULL, \`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`notification_receivers\` (\`id\` varchar(36) NOT NULL, \`notification_id\` varchar(255) NOT NULL, \`member_id\` varchar(255) NOT NULL, \`is_read\` tinyint NOT NULL DEFAULT 0, \`read_at\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, \`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`_noticeupacknowledgment\` (\`B\` varchar(36) NOT NULL, \`A\` varchar(36) NOT NULL, INDEX \`IDX_340eb7dec88fbf4cc89ff64de3\` (\`B\`), INDEX \`IDX_dfb414f827f32a7e26b0f3e8a2\` (\`A\`), PRIMARY KEY (\`B\`, \`A\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`_noticedownacknowledgment\` (\`B\` varchar(36) NOT NULL, \`A\` varchar(36) NOT NULL, INDEX \`IDX_2d57ca3bb5d686af5f61706d8a\` (\`B\`), INDEX \`IDX_4813acae2c0ed868d9e85f5225\` (\`A\`), PRIMARY KEY (\`B\`, \`A\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`_noticedepartments\` (\`B\` varchar(36) NOT NULL, \`A\` varchar(36) NOT NULL, INDEX \`IDX_713cc18a62e5cc33436ce77376\` (\`B\`), INDEX \`IDX_879a5ccfb44472f147716d1f87\` (\`A\`), PRIMARY KEY (\`B\`, \`A\`)) ENGINE=InnoDB`);
        await queryRunner.query(`CREATE TABLE \`_holidaydepartments\` (\`B\` varchar(36) NOT NULL, \`A\` varchar(36) NOT NULL, INDEX \`IDX_6d2d675302f3c5c3af3016a83a\` (\`B\`), INDEX \`IDX_2a718c8209062dec368e477d61\` (\`A\`), PRIMARY KEY (\`B\`, \`A\`)) ENGINE=InnoDB`);
        await queryRunner.query(`ALTER TABLE \`company\` ADD CONSTRAINT \`FK_0c6ea8a32565efcb512e572d61d\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`working_schedule\` ADD CONSTRAINT \`FK_2814f05e73089b95f0a7e9bc58b\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`leave_policy\` ADD CONSTRAINT \`FK_e8665e3b253027261a8af249452\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`departments\` ADD CONSTRAINT \`FK_200f04e4849cb794d547b6983a1\` FOREIGN KEY (\`department_head_id\`) REFERENCES \`members\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`departments\` ADD CONSTRAINT \`FK_392bbf7a4cf28bd0cdfa69a8970\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`designations\` ADD CONSTRAINT \`FK_4728de48d7d4a0323c4f581c880\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`locations\` ADD CONSTRAINT \`FK_2ce5c9e8fd1c1f0945db786e308\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`employement_types\` ADD CONSTRAINT \`FK_5e57334eca32b397f8cedaf04e5\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`hiring_sources\` ADD CONSTRAINT \`FK_caf0a00f832838bd658f358b4d6\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`events\` ADD CONSTRAINT \`FK_918130b4f882fda431503d6f4e0\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`notices\` ADD CONSTRAINT \`FK_6e8f4aeffb70eff67e72c792ea3\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_3eee8d9bac20dbabce411c52f4f\` FOREIGN KEY (\`department_id\`) REFERENCES \`departments\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_6259d4592d7c24fca9fb21f7938\` FOREIGN KEY (\`reporting_manager_id\`) REFERENCES \`members\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_62933351fdb38047703e3b8d1e5\` FOREIGN KEY (\`designation_id\`) REFERENCES \`designations\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_a9e0bf4c88d3885191d5385022b\` FOREIGN KEY (\`location_id\`) REFERENCES \`locations\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_a595b5a2db232be2233684ca05b\` FOREIGN KEY (\`employment_type_id\`) REFERENCES \`employement_types\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_aae2956f6114f0dd9fbe76e567c\` FOREIGN KEY (\`hiring_source_id\`) REFERENCES \`hiring_sources\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_438c781d1af76adc5cc6d9d1d1c\` FOREIGN KEY (\`eventsId\`) REFERENCES \`events\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_764bf7ff2544b85cf1a8298d03e\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`members\` ADD CONSTRAINT \`FK_88cffc021429fd8f833f1c3f15a\` FOREIGN KEY (\`noticesId\`) REFERENCES \`notices\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`work_experiences\` ADD CONSTRAINT \`FK_53673af6504eca1ce63e62b22a6\` FOREIGN KEY (\`member_id\`) REFERENCES \`members\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`work_experiences\` ADD CONSTRAINT \`FK_38e7588937c7ca136acf8a3a3b1\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`educations\` ADD CONSTRAINT \`FK_374560373a83e332f78def538cc\` FOREIGN KEY (\`member_id\`) REFERENCES \`members\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`educations\` ADD CONSTRAINT \`FK_b468e7e6265a4464c58c55b9658\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`attendance_breaks\` ADD CONSTRAINT \`FK_7d586d438d8b2123fa160827ba7\` FOREIGN KEY (\`attendance_id\`) REFERENCES \`attendances\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`attendance_breaks\` ADD CONSTRAINT \`FK_0edf01e362647cf09a71ba4518c\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`attendances\` ADD CONSTRAINT \`FK_2356832877cbc5cf26aca84e198\` FOREIGN KEY (\`member_id\`) REFERENCES \`members\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`attendances\` ADD CONSTRAINT \`FK_4fa5236dedf60886a5d2099e926\` FOREIGN KEY (\`location_id\`) REFERENCES \`locations\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`attendances\` ADD CONSTRAINT \`FK_b47acfc6e4d108d060e7b9c16ad\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`leaves\` ADD CONSTRAINT \`FK_4c5cbdf59315fddae800bc0d545\` FOREIGN KEY (\`member_id\`) REFERENCES \`members\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`leaves\` ADD CONSTRAINT \`FK_7d93f1b2454bf8b4ee0fc58c500\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`leaves\` ADD CONSTRAINT \`FK_6c9e43bf1012677777c1d8de6af\` FOREIGN KEY (\`approver_owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`leaves\` ADD CONSTRAINT \`FK_c37c05ad776088b265793ecb9c9\` FOREIGN KEY (\`approver_member_id\`) REFERENCES \`members\`(\`id\`) ON DELETE SET NULL ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`holidays\` ADD CONSTRAINT \`FK_1ef09ffe0cbce46bc8847a31d6d\` FOREIGN KEY (\`owner_id\`) REFERENCES \`owner\`(\`id\`) ON DELETE RESTRICT ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`notification_targets\` ADD CONSTRAINT \`FK_e63b40b36af4b7f7d57d7a17417\` FOREIGN KEY (\`notification_id\`) REFERENCES \`notifications\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`notification_receivers\` ADD CONSTRAINT \`FK_c085ef0560ed7de88633731834b\` FOREIGN KEY (\`notification_id\`) REFERENCES \`notifications\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`_noticeupacknowledgment\` ADD CONSTRAINT \`FK_340eb7dec88fbf4cc89ff64de33\` FOREIGN KEY (\`B\`) REFERENCES \`notices\`(\`id\`) ON DELETE CASCADE ON UPDATE CASCADE`);
        await queryRunner.query(`ALTER TABLE \`_noticeupacknowledgment\` ADD CONSTRAINT \`FK_dfb414f827f32a7e26b0f3e8a2a\` FOREIGN KEY (\`A\`) REFERENCES \`members\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`_noticedownacknowledgment\` ADD CONSTRAINT \`FK_2d57ca3bb5d686af5f61706d8a6\` FOREIGN KEY (\`B\`) REFERENCES \`notices\`(\`id\`) ON DELETE CASCADE ON UPDATE CASCADE`);
        await queryRunner.query(`ALTER TABLE \`_noticedownacknowledgment\` ADD CONSTRAINT \`FK_4813acae2c0ed868d9e85f52254\` FOREIGN KEY (\`A\`) REFERENCES \`members\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`_noticedepartments\` ADD CONSTRAINT \`FK_713cc18a62e5cc33436ce773760\` FOREIGN KEY (\`B\`) REFERENCES \`notices\`(\`id\`) ON DELETE CASCADE ON UPDATE CASCADE`);
        await queryRunner.query(`ALTER TABLE \`_noticedepartments\` ADD CONSTRAINT \`FK_879a5ccfb44472f147716d1f877\` FOREIGN KEY (\`A\`) REFERENCES \`departments\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
        await queryRunner.query(`ALTER TABLE \`_holidaydepartments\` ADD CONSTRAINT \`FK_6d2d675302f3c5c3af3016a83a5\` FOREIGN KEY (\`B\`) REFERENCES \`holidays\`(\`id\`) ON DELETE CASCADE ON UPDATE CASCADE`);
        await queryRunner.query(`ALTER TABLE \`_holidaydepartments\` ADD CONSTRAINT \`FK_2a718c8209062dec368e477d614\` FOREIGN KEY (\`A\`) REFERENCES \`departments\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE \`_holidaydepartments\` DROP FOREIGN KEY \`FK_2a718c8209062dec368e477d614\``);
        await queryRunner.query(`ALTER TABLE \`_holidaydepartments\` DROP FOREIGN KEY \`FK_6d2d675302f3c5c3af3016a83a5\``);
        await queryRunner.query(`ALTER TABLE \`_noticedepartments\` DROP FOREIGN KEY \`FK_879a5ccfb44472f147716d1f877\``);
        await queryRunner.query(`ALTER TABLE \`_noticedepartments\` DROP FOREIGN KEY \`FK_713cc18a62e5cc33436ce773760\``);
        await queryRunner.query(`ALTER TABLE \`_noticedownacknowledgment\` DROP FOREIGN KEY \`FK_4813acae2c0ed868d9e85f52254\``);
        await queryRunner.query(`ALTER TABLE \`_noticedownacknowledgment\` DROP FOREIGN KEY \`FK_2d57ca3bb5d686af5f61706d8a6\``);
        await queryRunner.query(`ALTER TABLE \`_noticeupacknowledgment\` DROP FOREIGN KEY \`FK_dfb414f827f32a7e26b0f3e8a2a\``);
        await queryRunner.query(`ALTER TABLE \`_noticeupacknowledgment\` DROP FOREIGN KEY \`FK_340eb7dec88fbf4cc89ff64de33\``);
        await queryRunner.query(`ALTER TABLE \`notification_receivers\` DROP FOREIGN KEY \`FK_c085ef0560ed7de88633731834b\``);
        await queryRunner.query(`ALTER TABLE \`notification_targets\` DROP FOREIGN KEY \`FK_e63b40b36af4b7f7d57d7a17417\``);
        await queryRunner.query(`ALTER TABLE \`holidays\` DROP FOREIGN KEY \`FK_1ef09ffe0cbce46bc8847a31d6d\``);
        await queryRunner.query(`ALTER TABLE \`leaves\` DROP FOREIGN KEY \`FK_c37c05ad776088b265793ecb9c9\``);
        await queryRunner.query(`ALTER TABLE \`leaves\` DROP FOREIGN KEY \`FK_6c9e43bf1012677777c1d8de6af\``);
        await queryRunner.query(`ALTER TABLE \`leaves\` DROP FOREIGN KEY \`FK_7d93f1b2454bf8b4ee0fc58c500\``);
        await queryRunner.query(`ALTER TABLE \`leaves\` DROP FOREIGN KEY \`FK_4c5cbdf59315fddae800bc0d545\``);
        await queryRunner.query(`ALTER TABLE \`attendances\` DROP FOREIGN KEY \`FK_b47acfc6e4d108d060e7b9c16ad\``);
        await queryRunner.query(`ALTER TABLE \`attendances\` DROP FOREIGN KEY \`FK_4fa5236dedf60886a5d2099e926\``);
        await queryRunner.query(`ALTER TABLE \`attendances\` DROP FOREIGN KEY \`FK_2356832877cbc5cf26aca84e198\``);
        await queryRunner.query(`ALTER TABLE \`attendance_breaks\` DROP FOREIGN KEY \`FK_0edf01e362647cf09a71ba4518c\``);
        await queryRunner.query(`ALTER TABLE \`attendance_breaks\` DROP FOREIGN KEY \`FK_7d586d438d8b2123fa160827ba7\``);
        await queryRunner.query(`ALTER TABLE \`educations\` DROP FOREIGN KEY \`FK_b468e7e6265a4464c58c55b9658\``);
        await queryRunner.query(`ALTER TABLE \`educations\` DROP FOREIGN KEY \`FK_374560373a83e332f78def538cc\``);
        await queryRunner.query(`ALTER TABLE \`work_experiences\` DROP FOREIGN KEY \`FK_38e7588937c7ca136acf8a3a3b1\``);
        await queryRunner.query(`ALTER TABLE \`work_experiences\` DROP FOREIGN KEY \`FK_53673af6504eca1ce63e62b22a6\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_88cffc021429fd8f833f1c3f15a\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_764bf7ff2544b85cf1a8298d03e\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_438c781d1af76adc5cc6d9d1d1c\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_aae2956f6114f0dd9fbe76e567c\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_a595b5a2db232be2233684ca05b\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_a9e0bf4c88d3885191d5385022b\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_62933351fdb38047703e3b8d1e5\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_6259d4592d7c24fca9fb21f7938\``);
        await queryRunner.query(`ALTER TABLE \`members\` DROP FOREIGN KEY \`FK_3eee8d9bac20dbabce411c52f4f\``);
        await queryRunner.query(`ALTER TABLE \`notices\` DROP FOREIGN KEY \`FK_6e8f4aeffb70eff67e72c792ea3\``);
        await queryRunner.query(`ALTER TABLE \`events\` DROP FOREIGN KEY \`FK_918130b4f882fda431503d6f4e0\``);
        await queryRunner.query(`ALTER TABLE \`hiring_sources\` DROP FOREIGN KEY \`FK_caf0a00f832838bd658f358b4d6\``);
        await queryRunner.query(`ALTER TABLE \`employement_types\` DROP FOREIGN KEY \`FK_5e57334eca32b397f8cedaf04e5\``);
        await queryRunner.query(`ALTER TABLE \`locations\` DROP FOREIGN KEY \`FK_2ce5c9e8fd1c1f0945db786e308\``);
        await queryRunner.query(`ALTER TABLE \`designations\` DROP FOREIGN KEY \`FK_4728de48d7d4a0323c4f581c880\``);
        await queryRunner.query(`ALTER TABLE \`departments\` DROP FOREIGN KEY \`FK_392bbf7a4cf28bd0cdfa69a8970\``);
        await queryRunner.query(`ALTER TABLE \`departments\` DROP FOREIGN KEY \`FK_200f04e4849cb794d547b6983a1\``);
        await queryRunner.query(`ALTER TABLE \`leave_policy\` DROP FOREIGN KEY \`FK_e8665e3b253027261a8af249452\``);
        await queryRunner.query(`ALTER TABLE \`working_schedule\` DROP FOREIGN KEY \`FK_2814f05e73089b95f0a7e9bc58b\``);
        await queryRunner.query(`ALTER TABLE \`company\` DROP FOREIGN KEY \`FK_0c6ea8a32565efcb512e572d61d\``);
        await queryRunner.query(`DROP INDEX \`IDX_2a718c8209062dec368e477d61\` ON \`_holidaydepartments\``);
        await queryRunner.query(`DROP INDEX \`IDX_6d2d675302f3c5c3af3016a83a\` ON \`_holidaydepartments\``);
        await queryRunner.query(`DROP TABLE \`_holidaydepartments\``);
        await queryRunner.query(`DROP INDEX \`IDX_879a5ccfb44472f147716d1f87\` ON \`_noticedepartments\``);
        await queryRunner.query(`DROP INDEX \`IDX_713cc18a62e5cc33436ce77376\` ON \`_noticedepartments\``);
        await queryRunner.query(`DROP TABLE \`_noticedepartments\``);
        await queryRunner.query(`DROP INDEX \`IDX_4813acae2c0ed868d9e85f5225\` ON \`_noticedownacknowledgment\``);
        await queryRunner.query(`DROP INDEX \`IDX_2d57ca3bb5d686af5f61706d8a\` ON \`_noticedownacknowledgment\``);
        await queryRunner.query(`DROP TABLE \`_noticedownacknowledgment\``);
        await queryRunner.query(`DROP INDEX \`IDX_dfb414f827f32a7e26b0f3e8a2\` ON \`_noticeupacknowledgment\``);
        await queryRunner.query(`DROP INDEX \`IDX_340eb7dec88fbf4cc89ff64de3\` ON \`_noticeupacknowledgment\``);
        await queryRunner.query(`DROP TABLE \`_noticeupacknowledgment\``);
        await queryRunner.query(`DROP TABLE \`notification_receivers\``);
        await queryRunner.query(`DROP TABLE \`notification_targets\``);
        await queryRunner.query(`DROP TABLE \`notifications\``);
        await queryRunner.query(`DROP INDEX \`IDX_1ef09ffe0cbce46bc8847a31d6\` ON \`holidays\``);
        await queryRunner.query(`DROP TABLE \`holidays\``);
        await queryRunner.query(`DROP INDEX \`IDX_4c5cbdf59315fddae800bc0d54\` ON \`leaves\``);
        await queryRunner.query(`DROP INDEX \`IDX_7d93f1b2454bf8b4ee0fc58c50\` ON \`leaves\``);
        await queryRunner.query(`DROP INDEX \`IDX_6c9e43bf1012677777c1d8de6a\` ON \`leaves\``);
        await queryRunner.query(`DROP INDEX \`IDX_c37c05ad776088b265793ecb9c\` ON \`leaves\``);
        await queryRunner.query(`DROP TABLE \`leaves\``);
        await queryRunner.query(`DROP INDEX \`IDX_4dae00a2b57f002bb7e2163205\` ON \`attendances\``);
        await queryRunner.query(`DROP INDEX \`IDX_2356832877cbc5cf26aca84e19\` ON \`attendances\``);
        await queryRunner.query(`DROP INDEX \`IDX_4fa5236dedf60886a5d2099e92\` ON \`attendances\``);
        await queryRunner.query(`DROP INDEX \`IDX_b47acfc6e4d108d060e7b9c16a\` ON \`attendances\``);
        await queryRunner.query(`DROP TABLE \`attendances\``);
        await queryRunner.query(`DROP INDEX \`IDX_7d586d438d8b2123fa160827ba\` ON \`attendance_breaks\``);
        await queryRunner.query(`DROP INDEX \`IDX_0edf01e362647cf09a71ba4518\` ON \`attendance_breaks\``);
        await queryRunner.query(`DROP TABLE \`attendance_breaks\``);
        await queryRunner.query(`DROP INDEX \`IDX_374560373a83e332f78def538c\` ON \`educations\``);
        await queryRunner.query(`DROP INDEX \`IDX_b468e7e6265a4464c58c55b965\` ON \`educations\``);
        await queryRunner.query(`DROP TABLE \`educations\``);
        await queryRunner.query(`DROP INDEX \`IDX_53673af6504eca1ce63e62b22a\` ON \`work_experiences\``);
        await queryRunner.query(`DROP INDEX \`IDX_38e7588937c7ca136acf8a3a3b\` ON \`work_experiences\``);
        await queryRunner.query(`DROP TABLE \`work_experiences\``);
        await queryRunner.query(`DROP INDEX \`IDX_3eee8d9bac20dbabce411c52f4\` ON \`members\``);
        await queryRunner.query(`DROP INDEX \`IDX_62933351fdb38047703e3b8d1e\` ON \`members\``);
        await queryRunner.query(`DROP INDEX \`IDX_a9e0bf4c88d3885191d5385022\` ON \`members\``);
        await queryRunner.query(`DROP INDEX \`IDX_a595b5a2db232be2233684ca05\` ON \`members\``);
        await queryRunner.query(`DROP INDEX \`IDX_aae2956f6114f0dd9fbe76e567\` ON \`members\``);
        await queryRunner.query(`DROP INDEX \`IDX_6259d4592d7c24fca9fb21f793\` ON \`members\``);
        await queryRunner.query(`DROP INDEX \`IDX_d75eefa29c161d6add2a30a10e\` ON \`members\``);
        await queryRunner.query(`DROP INDEX \`IDX_764bf7ff2544b85cf1a8298d03\` ON \`members\``);
        await queryRunner.query(`DROP TABLE \`members\``);
        await queryRunner.query(`DROP INDEX \`IDX_6e8f4aeffb70eff67e72c792ea\` ON \`notices\``);
        await queryRunner.query(`DROP TABLE \`notices\``);
        await queryRunner.query(`DROP INDEX \`IDX_918130b4f882fda431503d6f4e\` ON \`events\``);
        await queryRunner.query(`DROP TABLE \`events\``);
        await queryRunner.query(`DROP INDEX \`IDX_5a2ebba743fbfe34b1e3c8484e\` ON \`hiring_sources\``);
        await queryRunner.query(`DROP TABLE \`hiring_sources\``);
        await queryRunner.query(`DROP TABLE \`employement_types\``);
        await queryRunner.query(`DROP INDEX \`IDX_275f339962b95cdaff7ee256af\` ON \`locations\``);
        await queryRunner.query(`DROP TABLE \`locations\``);
        await queryRunner.query(`DROP INDEX \`IDX_d3970466236f7016e1327ac094\` ON \`designations\``);
        await queryRunner.query(`DROP TABLE \`designations\``);
        await queryRunner.query(`DROP INDEX \`REL_200f04e4849cb794d547b6983a\` ON \`departments\``);
        await queryRunner.query(`DROP INDEX \`IDX_2615e819c892a91466151eaf85\` ON \`departments\``);
        await queryRunner.query(`DROP INDEX \`IDX_200f04e4849cb794d547b6983a\` ON \`departments\``);
        await queryRunner.query(`DROP TABLE \`departments\``);
        await queryRunner.query(`DROP INDEX \`REL_e8665e3b253027261a8af24945\` ON \`leave_policy\``);
        await queryRunner.query(`DROP INDEX \`IDX_e8665e3b253027261a8af24945\` ON \`leave_policy\``);
        await queryRunner.query(`DROP TABLE \`leave_policy\``);
        await queryRunner.query(`DROP INDEX \`REL_2814f05e73089b95f0a7e9bc58\` ON \`working_schedule\``);
        await queryRunner.query(`DROP INDEX \`IDX_2814f05e73089b95f0a7e9bc58\` ON \`working_schedule\``);
        await queryRunner.query(`DROP TABLE \`working_schedule\``);
        await queryRunner.query(`DROP INDEX \`REL_0c6ea8a32565efcb512e572d61\` ON \`company\``);
        await queryRunner.query(`DROP INDEX \`IDX_0c6ea8a32565efcb512e572d61\` ON \`company\``);
        await queryRunner.query(`DROP TABLE \`company\``);
        await queryRunner.query(`DROP INDEX \`IDX_7431bbd2e694ee4a80c32bd7ef\` ON \`owner\``);
        await queryRunner.query(`DROP INDEX \`IDX_432373de5f77bd0786e7b912ad\` ON \`owner\``);
        await queryRunner.query(`DROP TABLE \`owner\``);
    }

}
