Last active
August 21, 2024 22:46
-
-
Save meetwudi/b8ec1984de64d6eed0f1a2d678f9a70c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MigrationInterface, QueryRunner } from "typeorm"; | |
export class InitSpace1724280148284 implements MigrationInterface { | |
name = 'InitSpace1724280148284' | |
public async up(queryRunner: QueryRunner): Promise<void> { | |
await queryRunner.query(`ALTER TABLE "coaching_categories" DROP CONSTRAINT "FK_b82341e647d8fb6f634382a7036"`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" DROP CONSTRAINT "fk_saved_view"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "FK_4163b1e02c8205c1d3e6b423ee6"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_action_errors" DROP CONSTRAINT "fk_approval_request_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" DROP CONSTRAINT "fk_approval_request_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" DROP CONSTRAINT "fk_approval_request_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" DROP CONSTRAINT "fk_approval_type_id_version"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" DROP CONSTRAINT "fk_approval_request_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" DROP CONSTRAINT "fk_approval_type_node_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" DROP CONSTRAINT "fk_approval_type_node_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" DROP CONSTRAINT "fk_approval_type_id_version"`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" DROP CONSTRAINT "fk_approval_type_id_version"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" DROP CONSTRAINT "fk_requester_input_step_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" DROP CONSTRAINT "fk_approval_request_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" DROP CONSTRAINT "fk_approval_type_id_version"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" DROP CONSTRAINT "fk_approval_request_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" DROP CONSTRAINT "fk_approval_request_node_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" DROP CONSTRAINT "fk_approver_input_step_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" DROP CONSTRAINT "fk_approval_task_id"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_user_events" DROP CONSTRAINT "fk_approval_request_id"`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" DROP CONSTRAINT "widget_instances_widget_id_fkey"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" DROP CONSTRAINT "scorecards_interviewer_id_fkey"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" DROP CONSTRAINT "scorecards_overall_rec_id_fkey"`); | |
await queryRunner.query(`DROP INDEX "public"."archived_okrs_extra_id_valid_from_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."archived_okrs_jira_id_unq"`); | |
await queryRunner.query(`DROP INDEX "public"."org_roles_name_unq"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_2690da0daf8277189c101af145"`); | |
await queryRunner.query(`DROP INDEX "public"."orgs_employees_key_unq"`); | |
await queryRunner.query(`DROP INDEX "public"."employees_id_unq"`); | |
await queryRunner.query(`DROP INDEX "public"."employees_email_unq"`); | |
await queryRunner.query(`DROP INDEX "public"."employees_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."employees_id_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."employees_email_valid_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."archived_okr_progress_updates_archived_okr_id_valid_from_valid_"`); | |
await queryRunner.query(`DROP INDEX "public"."org_levels_name_unq"`); | |
await queryRunner.query(`DROP INDEX "public"."idx_org_links_org_id"`); | |
await queryRunner.query(`DROP INDEX "public"."org_links_unique"`); | |
await queryRunner.query(`DROP INDEX "public"."orgs_id_unq"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_7f62efc40e39a1ac427389b5ee"`); | |
await queryRunner.query(`DROP INDEX "public"."idx_user_preferences_okta_uid_applies_to"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_b0382466cec934c23f69f188cf"`); | |
await queryRunner.query(`DROP INDEX "public"."share_key_unq_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."idx_tasks_unique"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_1bcdf26261a7261a98d782d807"`); | |
await queryRunner.query(`DROP INDEX "rogro"."rogro_employees_private_unq"`); | |
await queryRunner.query(`DROP INDEX "rogro"."performance_ratings_id_valid_from_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."performance_ratings_id_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_8a181763fd38b0df3fbbce773f"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_7f68e3342754d2f644e0942668"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_39b57dd7d6cfdd6e467a98c411"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_915d955e2e421d70d730e15120"`); | |
await queryRunner.query(`DROP INDEX "public"."jira_tickets_id_valid_from_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."jira_tickets_id_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."jira_tickets_jira_id_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."feedback_requests_review_id_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."feedback_requests_assigned_to_id_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."feedback_requests_assigned_by_id_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."feedback_requests_id_valid_from_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."feedback_requests_id_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."form_responses_id_valid_from_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."form_responses_id_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."form_responses_feedback_request_id_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_00e92a5cda30b3a4ff0d7c6732"`); | |
await queryRunner.query(`DROP INDEX "public"."comment_reactions_comment_id_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."comments_id_valid_from_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."comments_id_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."name_unq_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."calibration_groups_id_valid_from_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."calibration_groups_id_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "public"."archived_okr_relationships_jira_id_a_jira_id_b_unq"`); | |
await queryRunner.query(`DROP INDEX "public"."archived_okr_relationships_issue_link_id_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."IDX_63bc0bd9cc2d7ec485f35b541c"`); | |
await queryRunner.query(`DROP INDEX "rogro"."calibration_notes_valid_from_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."calibration_notes_valid_to_idx"`); | |
await queryRunner.query(`DROP INDEX "rogro"."emp_emp_cycle_type_unq_idx"`); | |
await queryRunner.query(`DROP INDEX "rosetr"."rosetr_session_evaluations_candidate_session_reviewer"`); | |
await queryRunner.query(`DROP INDEX "rosetr"."IDX_8636a31fc1f4b7094cbf1eec38"`); | |
await queryRunner.query(`DROP INDEX "rosetr"."IDX_34ca886bed6cf617fa97431ca1"`); | |
await queryRunner.query(`DROP INDEX "rosetr"."candidates_gh_candidate_id_idx"`); | |
await queryRunner.query(`DROP INDEX "rosetr"."candidates_gh_application_id_idx"`); | |
await queryRunner.query(`DROP INDEX "rosetr"."IDX_bc563571aceca37319d2137af8"`); | |
await queryRunner.query(`DROP INDEX "public"."idx_widget_instances_employee_page"`); | |
await queryRunner.query(`DROP INDEX "public"."idx_widget_instances_unique"`); | |
await queryRunner.query(`DROP INDEX "rosetr"."scorecards_interview_idx"`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" DROP CONSTRAINT "unique_employee_saved_view"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP CONSTRAINT "comment_reactions_comment_id_emoji_created_by_deleted_at_key"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" DROP CONSTRAINT "approval_request_external_ent_external_entity_id_external_e_key"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "is_remote"`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "northstar"`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "slack"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP COLUMN "prev_id"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP COLUMN "deny_by_default"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "tasks" ADD CONSTRAINT "PK_d15e75072717a39f0e36fc057ca" PRIMARY KEY ("employee_id", "integration_id", "external_task_id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_00e92a5cda30b3a4ff0d7c67320" PRIMARY KEY ("employee_id", "coaching_category_id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_a45c6e66f730b44a46bc405c775"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_00e92a5cda30b3a4ff0d7c67320" PRIMARY KEY ("employee_id", "coaching_category_id")`); | |
await queryRunner.query(`ALTER TABLE "company_objective" DROP CONSTRAINT "company_objective_pkey"`); | |
await queryRunner.query(`ALTER TABLE "company_objective" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "company_objective" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "company_objective" ADD CONSTRAINT "PK_948ffdfde9434ca150ab8a7c4eb" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "company_objective" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP CONSTRAINT "archived_okrs_extra_pkey"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP COLUMN "time_series_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD "time_series_id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD CONSTRAINT "PK_c0606adc8e024ccd6a2f73a7375" PRIMARY KEY ("time_series_id")`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP COLUMN "jira_advanced_roadmap_link"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD "jira_advanced_roadmap_link" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ALTER COLUMN "is_flagged" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP COLUMN "company_objective_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD "company_objective_id" integer`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD CONSTRAINT "UQ_4dea34b152a7ce2f24ce64099da" UNIQUE ("id")`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "jira_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "jira_id" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "status_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "status_id" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "status_name"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "status_name" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "name"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "name" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "parent_jira_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "parent_jira_id" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD CONSTRAINT "UQ_1e83af2fe650ea0dd291ab7c6b7" UNIQUE ("parent_jira_id")`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "org_schema"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "org_schema" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "priority_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "priority_id" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "priority_name"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "priority_name" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "compact_name"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "compact_name" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" DROP COLUMN "domains"`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ADD "domains" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ALTER COLUMN "birthday_consent" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ALTER COLUMN "survey_data_streak" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_roles" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "org_roles" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "org_roles" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_roles" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_roles" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP COLUMN "org_id"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD "org_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP COLUMN "role_id"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD "role_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "UQ_b9535a98350d5b26e7eb0c26af4" UNIQUE ("id")`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "UQ_765bc1ac8967533a04c74a9f6af" UNIQUE ("email")`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "location_country_code"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "location_country_code" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "org_id"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "org_id" integer`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "remote_status"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "remote_status" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "office_location"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "office_location" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_family0"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_family0" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_family1"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_family1" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_family2"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_family2" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_family3"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_family3" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employees" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employees" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "company"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "company" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "building"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "building" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "floor"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "floor" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "seat"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "seat" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "report_group"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "report_group" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "slack_avatar_url"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "slack_avatar_url" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "pronouns"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "pronouns" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "slack_id"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "slack_id" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_profile_start_date"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_profile_start_date" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "management_chain"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "management_chain" character varying`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" DROP COLUMN "archived_okr_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ADD "archived_okr_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "body" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "status" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" DROP COLUMN "updated_by"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ADD "updated_by" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_levels" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ALTER COLUMN "depth" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_links" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`DROP SEQUENCE "org_links_id_seq"`); | |
await queryRunner.query(`ALTER TABLE "org_links" DROP COLUMN "org_id"`); | |
await queryRunner.query(`ALTER TABLE "org_links" ADD "org_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "org_links" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_links" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "org_links" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "parent_id"`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "parent_id" integer`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "level_id"`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "level_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "org_schema"`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "org_schema" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "user_preferences" DROP COLUMN "okta_uid"`); | |
await queryRunner.query(`ALTER TABLE "user_preferences" ADD "okta_uid" character varying(255) NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "user_preferences" DROP COLUMN "applies_to"`); | |
await queryRunner.query(`ALTER TABLE "user_preferences" ADD "applies_to" character varying(255) NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "saved_views" ALTER COLUMN "share_key" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "saved_views" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "saved_views" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" ALTER COLUMN "last_viewed_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "users" DROP CONSTRAINT "PK_454e4c058b601a415df1d8de535"`); | |
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "okta_uid"`); | |
await queryRunner.query(`ALTER TABLE "users" ADD "okta_uid" character varying(255) NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "users" ADD CONSTRAINT "PK_454e4c058b601a415df1d8de535" PRIMARY KEY ("okta_uid")`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_4f16408e336e6a7356a5a51b0f"`); | |
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "okta_email"`); | |
await queryRunner.query(`ALTER TABLE "users" ADD "okta_email" character varying(255) NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "last_seen" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "tasks" ALTER COLUMN "integration_id" SET DEFAULT 'RoGRO'`); | |
await queryRunner.query(`ALTER TABLE "tasks" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "tasks" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "snapshots" DROP COLUMN "okta_uid"`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ADD "okta_uid" character varying(255) NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ALTER COLUMN "snapshot_date" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "snapshots" DROP COLUMN "applies_to"`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ADD "applies_to" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "snapshots" DROP COLUMN "org_schema"`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ADD "org_schema" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "settings" DROP COLUMN "tags"`); | |
await queryRunner.query(`ALTER TABLE "settings" ADD "tags" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "settings" ALTER COLUMN "value_text" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "settings" DROP COLUMN "created_at"`); | |
await queryRunner.query(`ALTER TABLE "settings" ADD "created_at" date NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "settings" DROP COLUMN "updated_at"`); | |
await queryRunner.query(`ALTER TABLE "settings" ADD "updated_at" date NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private_not_time_sliced" DROP COLUMN "new_hire_comp_level"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private_not_time_sliced" ADD "new_hire_comp_level" character varying`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private_not_time_sliced" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private_not_time_sliced" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "sessions" ALTER COLUMN "expired_at" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "sessions" DROP CONSTRAINT "PK_3238ef96f18b355b671619111bc"`); | |
await queryRunner.query(`ALTER TABLE "sessions" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "sessions" ADD "id" character varying(255) NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "sessions" ADD CONSTRAINT "PK_3238ef96f18b355b671619111bc" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" DROP COLUMN "comp_level"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" ADD "comp_level" character varying`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" DROP COLUMN "graders"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ADD "graders" text array NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" DROP COLUMN "targets"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ADD "targets" text array NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" DROP COLUMN "type"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ADD "type" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ALTER COLUMN "completed" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ALTER COLUMN "num_completed" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" DROP COLUMN "type"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ADD "type" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" DROP COLUMN "stack_rank"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ADD "stack_rank" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" DROP COLUMN "stack_tied"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ADD "stack_tied" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "self_reflection_active" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "manager_evaluation_active" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "peer_feedback_active" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "calibration_phase" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "upward_feedback_survey_id" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "upward_feedback_survey_url" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "manager_adjustment_active" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "manager_evaluations_for_manual_release" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "rogro_conversations_period_active" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "status" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "workday_sync_active" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "roundup_email_active" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" ADD CONSTRAINT "UQ_250cd65b031bb2c5e7347233d14" UNIQUE ("feedback_cycle_id")`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" DROP COLUMN "addl_context"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" ADD "addl_context" text`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "meeting_rooms" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "meeting_rooms" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" DROP CONSTRAINT "jira_tickets_pkey"`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" DROP COLUMN "time_series_id"`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ADD "time_series_id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ADD CONSTRAINT "PK_431c393ee2dcc49381f7825595b" PRIMARY KEY ("time_series_id")`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" DROP COLUMN "org_id"`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ADD "org_id" integer`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`DROP SEQUENCE "rogro"."feedback_requests_id_seq"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" DROP COLUMN "form_key"`); | |
await queryRunner.query(`CREATE TYPE "rogro"."feedback_requests_form_key_enum" AS ENUM('ManagerEval', 'PeerFeedback', 'SelfReflection')`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ADD "form_key" "rogro"."feedback_requests_form_key_enum" NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "assigned_to" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" DROP COLUMN "status"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ADD "status" character varying NOT NULL DEFAULT 'new'`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "title" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "declined_notes" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`DROP SEQUENCE "rogro"."form_responses_id_seq"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_continuous" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_continuous" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_request_rate_ms" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_request_rate_ms" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_frequency_ms" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_frequency_ms" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "active" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "active" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_a45c6e66f730b44a46bc405c775"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_6af444ff9352ff8d881e7612a26" PRIMARY KEY ("coaching_category_id", "id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_6af444ff9352ff8d881e7612a26"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "UQ_4163b1e02c8205c1d3e6b423ee6" UNIQUE ("coaching_category_id")`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP CONSTRAINT "comment_reactions_pkey"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD CONSTRAINT "PK_d10c03282d5280fe55f0bb67563" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP COLUMN "comment_id"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD "comment_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP COLUMN "emoji"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD "emoji" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP COLUMN "created_by"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD "created_by" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD CONSTRAINT "UQ_2a7a3eae297be9884b56eb9b623" UNIQUE ("created_by")`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP CONSTRAINT "comments_pkey"`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "time_series_id"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "time_series_id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD CONSTRAINT "PK_25aae70dd0af55a9be5db8bb956" PRIMARY KEY ("time_series_id")`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "parent_id"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "parent_id" integer`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "is_resolved" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "created_by"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "created_by" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "updated_by"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "updated_by" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "has_been_updated" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "initial_created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP CONSTRAINT "calibration_groups_pkey"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "time_series_id"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "time_series_id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD CONSTRAINT "PK_499129a169a8cb18d7a11196978" PRIMARY KEY ("time_series_id")`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "viewer_authz_policy"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "viewer_authz_policy" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "viewers"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "viewers" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "editors"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "editors" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "members"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "members" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ADD "id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" DROP COLUMN "jira_id_a"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ADD "jira_id_a" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" DROP COLUMN "jira_id_b"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ADD "jira_id_b" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`DROP SEQUENCE "rogro"."calibration_notes_id_seq"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" ADD CONSTRAINT "UQ_2c9a33f595cdddc30b55d11c37b" UNIQUE ("feedback_cycle_id")`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" ADD CONSTRAINT "UQ_eb56bd2994cd8f37c89b48a7bbf" UNIQUE ("created_by_employee_id")`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" ALTER COLUMN "valid_from" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP CONSTRAINT "PK_5c8a79801b44bd27b79228e1dad"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD CONSTRAINT "PK_5c8a79801b44bd27b79228e1dad" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP COLUMN "employee_ids"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD "employee_ids" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP COLUMN "extra_emails"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD "extra_emails" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rogro"."accomplishments" DROP COLUMN "pillars"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."accomplishments" ADD "pillars" text array NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "activity_logs" DROP COLUMN "type"`); | |
await queryRunner.query(`ALTER TABLE "activity_logs" ADD "type" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "activity_logs" DROP COLUMN "data"`); | |
await queryRunner.query(`ALTER TABLE "activity_logs" ADD "data" character varying`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" DROP COLUMN "compensation_notes"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ADD "compensation_notes" character varying`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ALTER COLUMN "needs_compensation_discussion" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ALTER COLUMN "needs_review_discussion" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" DROP COLUMN "packet_feedback"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ADD "packet_feedback" character varying`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" DROP COLUMN "private_notes"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ADD "private_notes" character varying`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" DROP COLUMN "committee_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" ADD "committee_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" DROP CONSTRAINT "PK_d674c70e45241dde1bd9d8fe21b"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" ADD CONSTRAINT "PK_d674c70e45241dde1bd9d8fe21b" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" DROP CONSTRAINT "PK_69acdd168edf3e61a2a0b4ed13b"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" ADD CONSTRAINT "PK_69acdd168edf3e61a2a0b4ed13b" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" ALTER COLUMN "specialty_types" SET DEFAULT '[]'`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" ALTER COLUMN "updated_at" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" DROP COLUMN "committee_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ADD "committee_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" DROP CONSTRAINT "PK_3238ef96f18b355b671619111bc"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ADD CONSTRAINT "PK_3238ef96f18b355b671619111bc" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ALTER COLUMN "status" SET DEFAULT 'Not Started'`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewer_feedback" DROP CONSTRAINT "interviewer_feedback_pkey"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewer_feedback" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewer_feedback" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewer_feedback" ADD CONSTRAINT "PK_bd845e4025f93285e379a94b868" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ALTER COLUMN "greenhouse_application_id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ALTER COLUMN "greenhouse_candidate_id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ALTER COLUMN "hide_in_ros" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" DROP CONSTRAINT "PK_140681296bf033ab1eb95288abb"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ADD CONSTRAINT "PK_140681296bf033ab1eb95288abb" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ALTER COLUMN "interview_summary" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" DROP COLUMN "notes"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ADD "notes" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP COLUMN "compensation_approver_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD "compensation_approver_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP COLUMN "candidate_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD "candidate_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD CONSTRAINT "UQ_3f99070174c02cb189d85361918" UNIQUE ("candidate_id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP CONSTRAINT "PK_a6bd2382db484b5573ddb720f4f"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD CONSTRAINT "PK_a6bd2382db484b5573ddb720f4f" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP COLUMN "session_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD "session_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ALTER COLUMN "reject_reasons" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ALTER COLUMN "reject_reasons" SET DEFAULT '[]'`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" DROP CONSTRAINT "hackweek_events_pkey"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ADD CONSTRAINT "PK_398c8a30bfc10950a36abf6c4af" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "team_formation_starts" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "team_formation_ends" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "submission_starts" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "submission_ends" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "voting_starts" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "voting_ends" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP CONSTRAINT "hackweek_projects_pkey"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD CONSTRAINT "PK_892e96278ab8e3779e9af797cea" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ALTER COLUMN "skills" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP COLUMN "hackweek_event_id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD "hackweek_event_id" integer`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ALTER COLUMN "created_by_employee_id" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD CONSTRAINT "UQ_5d2ece4569913e4620251f88196" UNIQUE ("created_by_employee_id")`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP CONSTRAINT "hackweek_participants_pkey"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD CONSTRAINT "PK_5951ac291dbd60aedbb406a8863" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP COLUMN "employee_id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD "employee_id" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP COLUMN "relationship"`); | |
await queryRunner.query(`DROP TYPE "public"."hwp_relationship"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD "relationship" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP COLUMN "hackweek_project_id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD "hackweek_project_id" integer`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD CONSTRAINT "UQ_d14c861a6e2e609b79410ab697f" UNIQUE ("hackweek_project_id")`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_action_errors" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_action_errors" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" DROP COLUMN "comment"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ADD "comment" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" DROP COLUMN "admins"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ADD "admins" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "sync_to_ros_task" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "require_name" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "allow_central_creation" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "description" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" DROP COLUMN "next_node_ids"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ADD "next_node_ids" uuid NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" DROP COLUMN "prev_node_ids"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ADD "prev_node_ids" uuid NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "node_error" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "description" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "validator" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "required" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "required" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "readable_id" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "description" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" DROP COLUMN "next_node_ids"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ADD "next_node_ids" uuid NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "node_operator_extra" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "tasks_composer" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "tasks_composer" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "tasks_composer_extra" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "approved_text" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "denied_text" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "notify_on_pending" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "node_alias" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "description" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" DROP COLUMN "post_processor_extra"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ADD "post_processor_extra" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" DROP COLUMN "fallback_instruction"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ADD "fallback_instruction" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "callback_retry_limit" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "description" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "validator" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "required" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "required" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "readable_id" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" DROP COLUMN "group_number"`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ADD "group_number" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ADD CONSTRAINT "UQ_2ad8a369830a9d3673c174e16ec" UNIQUE ("requester_input_step_id")`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ALTER COLUMN "value" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" DROP COLUMN "description"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ADD "description" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" DROP COLUMN "callback_failed"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ADD "callback_failed" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" DROP COLUMN "watchers"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ADD "watchers" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "task_error" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" DROP COLUMN "delegated_from"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ADD "delegated_from" integer NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "delegated_by" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ALTER COLUMN "value" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_user_events" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_user_events" ALTER COLUMN "operand" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_user_events" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" ALTER COLUMN "additional_config" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "can_be_deleted" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "can_be_deleted" SET DEFAULT true`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "can_be_moved" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "can_be_moved" SET DEFAULT true`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "restricted_to_pages" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "restricted_to_pages" SET DEFAULT '{}'`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "created_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewers" ALTER COLUMN "interviews" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewers" ALTER COLUMN "yes_recs" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" ALTER COLUMN "interview" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecard_rec_vals" ALTER COLUMN "id" DROP DEFAULT`); | |
await queryRunner.query(`DROP SEQUENCE "rosetr"."scorecard_rec_vals_id_seq"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecard_rec_vals" DROP CONSTRAINT "scorecard_rec_vals_code_key"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecard_rec_vals" ALTER COLUMN "is_yes" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_c7ce2441fea6589947ea5bf7aaa" PRIMARY KEY ("id", "employee_id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_c7ce2441fea6589947ea5bf7aaa"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_a45c6e66f730b44a46bc405c775" PRIMARY KEY ("employee_id", "id", "coaching_category_id")`); | |
await queryRunner.query(`CREATE INDEX "IDX_4f16408e336e6a7356a5a51b0f" ON "users" ("okta_email") `); | |
await queryRunner.query(`CREATE INDEX "IDX_1675814798a805593cbd6b464f" ON "employee_coaching_categories" ("employee_id") `); | |
await queryRunner.query(`CREATE INDEX "IDX_4163b1e02c8205c1d3e6b423ee" ON "employee_coaching_categories" ("coaching_category_id") `); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD CONSTRAINT "FK_37d89125bc55d09aade16f765ee" FOREIGN KEY ("company_objective_id") REFERENCES "company_objective"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD CONSTRAINT "FK_1e83af2fe650ea0dd291ab7c6b7" FOREIGN KEY ("parent_jira_id") REFERENCES "archived_okrs"("jira_id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD CONSTRAINT "FK_4dea34b152a7ce2f24ce64099da" FOREIGN KEY ("id") REFERENCES "archived_okrs_extra"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "coaching_categories" ADD CONSTRAINT "FK_b82341e647d8fb6f634382a7036" FOREIGN KEY ("coaching_group_id") REFERENCES "coaching_groups"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD CONSTRAINT "FK_df90dbdb9523dcdd6d6cf019f4e" FOREIGN KEY ("org_id") REFERENCES "orgs"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD CONSTRAINT "FK_7ca42af8c2edf2694d4f1ab53a2" FOREIGN KEY ("employee_id") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD CONSTRAINT "FK_8e8f0b6fbf6c8619cea5fdcdfb8" FOREIGN KEY ("role_id") REFERENCES "org_roles"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "FK_b75e1cf8e5b4de783e41263b15f" FOREIGN KEY ("org_id") REFERENCES "orgs"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "FK_b39edf3a8eff4ef89dab314ea23" FOREIGN KEY ("manager_direct") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "FK_778158df819c26e8cc8137df244" FOREIGN KEY ("manager_dlevel") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "FK_537e7737bda774c290d6e231b82" FOREIGN KEY ("manager_vlevel") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "FK_443b8d822b5d037a37a97016893" FOREIGN KEY ("manager_clevel") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "FK_b9535a98350d5b26e7eb0c26af4" FOREIGN KEY ("id") REFERENCES "employees_extra"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD CONSTRAINT "FK_b9535a98350d5b26e7eb0c26af4" FOREIGN KEY ("id") REFERENCES "employees_state"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ADD CONSTRAINT "FK_ebdb0016bdb79ab8a3090bcb497" FOREIGN KEY ("updated_by") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ADD CONSTRAINT "FK_d12e0a9aa478a16b5652d3191dd" FOREIGN KEY ("archived_okr_id") REFERENCES "archived_okrs"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "org_links" ADD CONSTRAINT "FK_888933fd135b0454a3a113a4567" FOREIGN KEY ("org_id") REFERENCES "orgs"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD CONSTRAINT "FK_08684a946eeac747a78498a7168" FOREIGN KEY ("parent_id") REFERENCES "orgs"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD CONSTRAINT "FK_549508432d4a57bfb5014028a70" FOREIGN KEY ("level_id") REFERENCES "org_levels"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" ADD CONSTRAINT "FK_faf1fd4a8a010076d9726c1cb1c" FOREIGN KEY ("saved_view_id") REFERENCES "saved_views"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" ADD CONSTRAINT "FK_250cd65b031bb2c5e7347233d14" FOREIGN KEY ("feedback_cycle_id") REFERENCES "rogro"."feedback_cycles"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pending_business_titles" ADD CONSTRAINT "FK_edcf759b599eea9960234b30c2b" FOREIGN KEY ("updated_by") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ADD CONSTRAINT "FK_fd30e026259b83a5ed38a5a0e63" FOREIGN KEY ("feedback_cycle_id") REFERENCES "rogro"."feedback_cycles"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ADD CONSTRAINT "FK_9e40d8cff5ab2318bac88fcf63f" FOREIGN KEY ("assigned_by") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ADD CONSTRAINT "FK_f0b6edea81443f92690de6ff3b4" FOREIGN KEY ("assigned_to") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ADD CONSTRAINT "FK_1ec38f7aae0aae110c6532f73e0" FOREIGN KEY ("review_subject_id") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ADD CONSTRAINT "FK_39ad6154dacd8adc1e73f7bbf63" FOREIGN KEY ("feedback_request_id") REFERENCES "rogro"."feedback_requests"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "FK_4163b1e02c8205c1d3e6b423ee6" FOREIGN KEY ("coaching_category_id") REFERENCES "coaching_categories"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD CONSTRAINT "FK_2a7a3eae297be9884b56eb9b623" FOREIGN KEY ("created_by") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD CONSTRAINT "FK_d6f93329801a93536da4241e386" FOREIGN KEY ("parent_id") REFERENCES "comments"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD CONSTRAINT "FK_980bfefe00ed11685f325d0bd4c" FOREIGN KEY ("created_by") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD CONSTRAINT "FK_0c865c87e7c7d3274f83b671771" FOREIGN KEY ("updated_by") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD CONSTRAINT "FK_4042ad75f166e7f4a324857965e" FOREIGN KEY ("updated_by") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" ADD CONSTRAINT "FK_2c9a33f595cdddc30b55d11c37b" FOREIGN KEY ("feedback_cycle_id") REFERENCES "rogro"."feedback_cycles"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" ADD CONSTRAINT "FK_eb56bd2994cd8f37c89b48a7bbf" FOREIGN KEY ("created_by_employee_id") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rogro"."accomplishments" ADD CONSTRAINT "FK_8ccccf683475e64f5879526f5e8" FOREIGN KEY ("created_by_employee_id") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" ADD CONSTRAINT "FK_7410db6ee097228a8f3b2035aa4" FOREIGN KEY ("committee_id") REFERENCES "rosetr"."committees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ADD CONSTRAINT "FK_0d5af6727cb60268401967a7cf9" FOREIGN KEY ("committee_id") REFERENCES "rosetr"."committees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD CONSTRAINT "FK_3f99070174c02cb189d85361918" FOREIGN KEY ("candidate_id") REFERENCES "rosetr"."candidates"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD CONSTRAINT "FK_7731fd7989160039ee1ae5ff49c" FOREIGN KEY ("hackweek_event_id") REFERENCES "hackweek_events"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD CONSTRAINT "FK_5d2ece4569913e4620251f88196" FOREIGN KEY ("created_by_employee_id") REFERENCES "employees"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD CONSTRAINT "FK_d14c861a6e2e609b79410ab697f" FOREIGN KEY ("hackweek_project_id") REFERENCES "hackweek_projects"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_action_errors" ADD CONSTRAINT "FK_149b13de9baabda0c9ea60d2cd9" FOREIGN KEY ("approval_request_id") REFERENCES "approval"."approval_requests"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ADD CONSTRAINT "FK_deedfa8a7a547fdeae016489022" FOREIGN KEY ("approval_request_id") REFERENCES "approval"."approval_requests"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ADD CONSTRAINT "FK_322b37b0377af7380f5abb62c7b" FOREIGN KEY ("approval_request_id") REFERENCES "approval"."approval_requests"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ADD CONSTRAINT "FK_c7632ae199ed1fe8f5e7317872c" FOREIGN KEY ("approval_type_node_id") REFERENCES "approval"."approval_type_nodes"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ADD CONSTRAINT "FK_5b89880478d150da2023a2bddae" FOREIGN KEY ("approval_request_id") REFERENCES "approval"."approval_requests"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ADD CONSTRAINT "FK_9633541ab467714758018078187" FOREIGN KEY ("approval_type_node_id") REFERENCES "approval"."approval_type_nodes"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ADD CONSTRAINT "FK_5ede668adfbaebac0dc9fb7b7c3" FOREIGN KEY ("approval_type_version", "approval_type_id") REFERENCES "approval"."approval_types"("version","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ADD CONSTRAINT "FK_f9bbfb056f820801c092f6ddcea" FOREIGN KEY ("version", "id") REFERENCES "approval"."approval_type_config"("approval_type_version","approval_type_id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ADD CONSTRAINT "FK_48fc8b2d5bf1204f321d8127a7a" FOREIGN KEY ("approval_type_version", "approval_type_id") REFERENCES "approval"."approval_types"("version","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ADD CONSTRAINT "FK_cfe0fad5b1aeb880ca61f1ddf50" FOREIGN KEY ("approval_request_id") REFERENCES "approval"."approval_requests"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ADD CONSTRAINT "FK_2ad8a369830a9d3673c174e16ec" FOREIGN KEY ("requester_input_step_id") REFERENCES "approval"."requester_input_steps"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ADD CONSTRAINT "FK_123ff2ffbe95da65897038ec608" FOREIGN KEY ("approval_type_version", "approval_type_id") REFERENCES "approval"."approval_types"("version","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ADD CONSTRAINT "FK_35ccded944274297c75bfd9bd13" FOREIGN KEY ("approval_request_id") REFERENCES "approval"."approval_requests"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ADD CONSTRAINT "FK_4a0652a4ab72d2b8351aff4d307" FOREIGN KEY ("approval_request_node_id") REFERENCES "approval"."approval_request_nodes"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ADD CONSTRAINT "FK_4b057d0f892d506edac9bdfe861" FOREIGN KEY ("approval_task_id") REFERENCES "approval"."approval_request_tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ADD CONSTRAINT "FK_eb99ce112e79432767b329c3eeb" FOREIGN KEY ("approver_input_step_id") REFERENCES "approval"."approver_input_steps"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" ADD CONSTRAINT "FK_feef6cd46715cb35cb0a93ea3e4" FOREIGN KEY ("widget_id") REFERENCES "widgets"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" ADD CONSTRAINT "FK_d3956444adda46e9fe916f377e5" FOREIGN KEY ("overall_rec_id") REFERENCES "rosetr"."scorecard_rec_vals"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" ADD CONSTRAINT "FK_48181e9cb9185790634a5e16439" FOREIGN KEY ("interviewer_id") REFERENCES "rosetr"."interviewers"("greenhouse_user_id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "FK_1675814798a805593cbd6b464fc" FOREIGN KEY ("employee_id") REFERENCES "employees_extra"("id") ON DELETE CASCADE ON UPDATE CASCADE`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "FK_1675814798a805593cbd6b464fc" FOREIGN KEY ("employee_id") REFERENCES "employees"("id") ON DELETE CASCADE ON UPDATE CASCADE`); | |
} | |
public async down(queryRunner: QueryRunner): Promise<void> { | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "FK_1675814798a805593cbd6b464fc"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "FK_1675814798a805593cbd6b464fc"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" DROP CONSTRAINT "FK_48181e9cb9185790634a5e16439"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" DROP CONSTRAINT "FK_d3956444adda46e9fe916f377e5"`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" DROP CONSTRAINT "FK_feef6cd46715cb35cb0a93ea3e4"`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" DROP CONSTRAINT "FK_eb99ce112e79432767b329c3eeb"`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" DROP CONSTRAINT "FK_4b057d0f892d506edac9bdfe861"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" DROP CONSTRAINT "FK_4a0652a4ab72d2b8351aff4d307"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" DROP CONSTRAINT "FK_35ccded944274297c75bfd9bd13"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" DROP CONSTRAINT "FK_123ff2ffbe95da65897038ec608"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" DROP CONSTRAINT "FK_2ad8a369830a9d3673c174e16ec"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" DROP CONSTRAINT "FK_cfe0fad5b1aeb880ca61f1ddf50"`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" DROP CONSTRAINT "FK_48fc8b2d5bf1204f321d8127a7a"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" DROP CONSTRAINT "FK_f9bbfb056f820801c092f6ddcea"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" DROP CONSTRAINT "FK_5ede668adfbaebac0dc9fb7b7c3"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" DROP CONSTRAINT "FK_9633541ab467714758018078187"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" DROP CONSTRAINT "FK_5b89880478d150da2023a2bddae"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" DROP CONSTRAINT "FK_c7632ae199ed1fe8f5e7317872c"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" DROP CONSTRAINT "FK_322b37b0377af7380f5abb62c7b"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" DROP CONSTRAINT "FK_deedfa8a7a547fdeae016489022"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_action_errors" DROP CONSTRAINT "FK_149b13de9baabda0c9ea60d2cd9"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP CONSTRAINT "FK_d14c861a6e2e609b79410ab697f"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP CONSTRAINT "FK_5d2ece4569913e4620251f88196"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP CONSTRAINT "FK_7731fd7989160039ee1ae5ff49c"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP CONSTRAINT "FK_3f99070174c02cb189d85361918"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" DROP CONSTRAINT "FK_0d5af6727cb60268401967a7cf9"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" DROP CONSTRAINT "FK_7410db6ee097228a8f3b2035aa4"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."accomplishments" DROP CONSTRAINT "FK_8ccccf683475e64f5879526f5e8"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" DROP CONSTRAINT "FK_eb56bd2994cd8f37c89b48a7bbf"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" DROP CONSTRAINT "FK_2c9a33f595cdddc30b55d11c37b"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP CONSTRAINT "FK_4042ad75f166e7f4a324857965e"`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP CONSTRAINT "FK_0c865c87e7c7d3274f83b671771"`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP CONSTRAINT "FK_980bfefe00ed11685f325d0bd4c"`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP CONSTRAINT "FK_d6f93329801a93536da4241e386"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP CONSTRAINT "FK_2a7a3eae297be9884b56eb9b623"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "FK_4163b1e02c8205c1d3e6b423ee6"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" DROP CONSTRAINT "FK_39ad6154dacd8adc1e73f7bbf63"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" DROP CONSTRAINT "FK_1ec38f7aae0aae110c6532f73e0"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" DROP CONSTRAINT "FK_f0b6edea81443f92690de6ff3b4"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" DROP CONSTRAINT "FK_9e40d8cff5ab2318bac88fcf63f"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" DROP CONSTRAINT "FK_fd30e026259b83a5ed38a5a0e63"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pending_business_titles" DROP CONSTRAINT "FK_edcf759b599eea9960234b30c2b"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" DROP CONSTRAINT "FK_250cd65b031bb2c5e7347233d14"`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" DROP CONSTRAINT "FK_faf1fd4a8a010076d9726c1cb1c"`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP CONSTRAINT "FK_549508432d4a57bfb5014028a70"`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP CONSTRAINT "FK_08684a946eeac747a78498a7168"`); | |
await queryRunner.query(`ALTER TABLE "org_links" DROP CONSTRAINT "FK_888933fd135b0454a3a113a4567"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" DROP CONSTRAINT "FK_d12e0a9aa478a16b5652d3191dd"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" DROP CONSTRAINT "FK_ebdb0016bdb79ab8a3090bcb497"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "FK_b9535a98350d5b26e7eb0c26af4"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "FK_b9535a98350d5b26e7eb0c26af4"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "FK_443b8d822b5d037a37a97016893"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "FK_537e7737bda774c290d6e231b82"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "FK_778158df819c26e8cc8137df244"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "FK_b39edf3a8eff4ef89dab314ea23"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "FK_b75e1cf8e5b4de783e41263b15f"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP CONSTRAINT "FK_8e8f0b6fbf6c8619cea5fdcdfb8"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP CONSTRAINT "FK_7ca42af8c2edf2694d4f1ab53a2"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP CONSTRAINT "FK_df90dbdb9523dcdd6d6cf019f4e"`); | |
await queryRunner.query(`ALTER TABLE "coaching_categories" DROP CONSTRAINT "FK_b82341e647d8fb6f634382a7036"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP CONSTRAINT "FK_4dea34b152a7ce2f24ce64099da"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP CONSTRAINT "FK_1e83af2fe650ea0dd291ab7c6b7"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP CONSTRAINT "FK_37d89125bc55d09aade16f765ee"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_4163b1e02c8205c1d3e6b423ee"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_1675814798a805593cbd6b464f"`); | |
await queryRunner.query(`DROP INDEX "public"."IDX_4f16408e336e6a7356a5a51b0f"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_a45c6e66f730b44a46bc405c775"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_c7ce2441fea6589947ea5bf7aaa" PRIMARY KEY ("employee_id", "id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_c7ce2441fea6589947ea5bf7aaa"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecard_rec_vals" ALTER COLUMN "is_yes" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecard_rec_vals" ADD CONSTRAINT "scorecard_rec_vals_code_key" UNIQUE ("code")`); | |
await queryRunner.query(`CREATE SEQUENCE IF NOT EXISTS "rosetr"."scorecard_rec_vals_id_seq" OWNED BY "rosetr"."scorecard_rec_vals"."id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecard_rec_vals" ALTER COLUMN "id" SET DEFAULT nextval('"rosetr"."scorecard_rec_vals_id_seq"')`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" ALTER COLUMN "interview" SET DEFAULT ''`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewers" ALTER COLUMN "yes_recs" SET DEFAULT '0'`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewers" ALTER COLUMN "interviews" SET DEFAULT '0'`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "restricted_to_pages" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "restricted_to_pages" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "can_be_moved" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "can_be_moved" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "can_be_deleted" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "widgets" ALTER COLUMN "can_be_deleted" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" ALTER COLUMN "additional_config" SET DEFAULT '{}'`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_user_events" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_user_events" ALTER COLUMN "operand" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_user_events" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ALTER COLUMN "value" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "delegated_by" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" DROP COLUMN "delegated_from"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ADD "delegated_from" uuid`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "task_error" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" DROP COLUMN "watchers"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ADD "watchers" integer array NOT NULL DEFAULT '{}'`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" DROP COLUMN "callback_failed"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ADD "callback_failed" boolean DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" DROP COLUMN "description"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ADD "description" text`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ALTER COLUMN "value" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" DROP CONSTRAINT "UQ_2ad8a369830a9d3673c174e16ec"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" DROP COLUMN "group_number"`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ADD "group_number" smallint NOT NULL DEFAULT '0'`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "readable_id" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "required" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "required" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "validator" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "description" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "callback_retry_limit" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" DROP COLUMN "fallback_instruction"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ADD "fallback_instruction" text`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" DROP COLUMN "post_processor_extra"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ADD "post_processor_extra" jsonb`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "description" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_types" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "node_alias" SET DEFAULT '0'`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "notify_on_pending" SET DEFAULT true`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "denied_text" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "approved_text" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "tasks_composer_extra" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "tasks_composer" SET DEFAULT 'or'`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "tasks_composer" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "node_operator_extra" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" DROP COLUMN "next_node_ids"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ADD "next_node_ids" uuid array`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "description" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "readable_id" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "required" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "required" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "validator" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "description" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "node_error" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" DROP COLUMN "prev_node_ids"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ADD "prev_node_ids" uuid array`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" DROP COLUMN "next_node_ids"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ADD "next_node_ids" uuid array`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "description" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "allow_central_creation" SET DEFAULT true`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "require_name" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ALTER COLUMN "sync_to_ros_task" SET DEFAULT true`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" DROP COLUMN "admins"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ADD "admins" integer array NOT NULL DEFAULT '{}'`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" DROP COLUMN "comment"`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ADD "comment" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_action_errors" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_action_errors" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4()`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP CONSTRAINT "UQ_d14c861a6e2e609b79410ab697f"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP COLUMN "hackweek_project_id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD "hackweek_project_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP COLUMN "relationship"`); | |
await queryRunner.query(`CREATE TYPE "public"."hwp_relationship" AS ENUM('Member', 'Voter')`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD "relationship" "public"."hwp_relationship" NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP COLUMN "employee_id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD "employee_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP CONSTRAINT "PK_5951ac291dbd60aedbb406a8863"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_participants" ADD CONSTRAINT "hackweek_participants_pkey" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP CONSTRAINT "UQ_5d2ece4569913e4620251f88196"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ALTER COLUMN "created_by_employee_id" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP COLUMN "hackweek_event_id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD "hackweek_event_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ALTER COLUMN "skills" SET DEFAULT '{}'`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP CONSTRAINT "PK_892e96278ab8e3779e9af797cea"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_projects" ADD CONSTRAINT "hackweek_projects_pkey" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "voting_ends" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "voting_starts" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "submission_ends" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "submission_starts" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "team_formation_ends" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ALTER COLUMN "team_formation_starts" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" DROP CONSTRAINT "PK_398c8a30bfc10950a36abf6c4af"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "hackweek_events" ADD CONSTRAINT "hackweek_events_pkey" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ALTER COLUMN "reject_reasons" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ALTER COLUMN "reject_reasons" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ALTER COLUMN "updated_at" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP COLUMN "session_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD "session_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP CONSTRAINT "PK_a6bd2382db484b5573ddb720f4f"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD CONSTRAINT "PK_a6bd2382db484b5573ddb720f4f" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP CONSTRAINT "UQ_3f99070174c02cb189d85361918"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP COLUMN "candidate_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD "candidate_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" DROP COLUMN "compensation_approver_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_candidates" ADD "compensation_approver_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" DROP COLUMN "notes"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ADD "notes" text NOT NULL DEFAULT ''`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ALTER COLUMN "interview_summary" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" DROP CONSTRAINT "PK_140681296bf033ab1eb95288abb"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ADD CONSTRAINT "PK_140681296bf033ab1eb95288abb" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ALTER COLUMN "hide_in_ros" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ALTER COLUMN "greenhouse_candidate_id" SET DEFAULT '0'`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."candidates" ALTER COLUMN "greenhouse_application_id" SET DEFAULT '0'`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewer_feedback" DROP CONSTRAINT "PK_bd845e4025f93285e379a94b868"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewer_feedback" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewer_feedback" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."interviewer_feedback" ADD CONSTRAINT "interviewer_feedback_pkey" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ALTER COLUMN "status" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" DROP CONSTRAINT "PK_3238ef96f18b355b671619111bc"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ADD CONSTRAINT "PK_3238ef96f18b355b671619111bc" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" DROP COLUMN "committee_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."sessions" ADD "committee_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" ALTER COLUMN "updated_at" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" ALTER COLUMN "specialty_types" SET DEFAULT '{}'`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" DROP CONSTRAINT "PK_69acdd168edf3e61a2a0b4ed13b"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committees" ADD CONSTRAINT "PK_69acdd168edf3e61a2a0b4ed13b" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" DROP CONSTRAINT "PK_d674c70e45241dde1bd9d8fe21b"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" ADD CONSTRAINT "PK_d674c70e45241dde1bd9d8fe21b" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" DROP COLUMN "committee_id"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."committee_members" ADD "committee_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" DROP COLUMN "private_notes"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ADD "private_notes" text`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" DROP COLUMN "packet_feedback"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ADD "packet_feedback" text`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ALTER COLUMN "needs_review_discussion" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ALTER COLUMN "needs_compensation_discussion" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" DROP COLUMN "compensation_notes"`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."session_evaluations" ADD "compensation_notes" text`); | |
await queryRunner.query(`ALTER TABLE "activity_logs" DROP COLUMN "data"`); | |
await queryRunner.query(`ALTER TABLE "activity_logs" ADD "data" text`); | |
await queryRunner.query(`ALTER TABLE "activity_logs" DROP COLUMN "type"`); | |
await queryRunner.query(`ALTER TABLE "activity_logs" ADD "type" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."accomplishments" DROP COLUMN "pillars"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."accomplishments" ADD "pillars" text`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP COLUMN "extra_emails"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD "extra_emails" character varying array NOT NULL DEFAULT ARRAY[]`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP COLUMN "employee_ids"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD "employee_ids" bigint array NOT NULL DEFAULT ARRAY[]`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP CONSTRAINT "PK_5c8a79801b44bd27b79228e1dad"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD CONSTRAINT "PK_5c8a79801b44bd27b79228e1dad" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" DROP CONSTRAINT "UQ_eb56bd2994cd8f37c89b48a7bbf"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" DROP CONSTRAINT "UQ_2c9a33f595cdddc30b55d11c37b"`); | |
await queryRunner.query(`CREATE SEQUENCE IF NOT EXISTS "rogro"."calibration_notes_id_seq" OWNED BY "rogro"."calibration_notes"."id"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_notes" ALTER COLUMN "id" SET DEFAULT nextval('"rogro"."calibration_notes_id_seq"')`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" DROP COLUMN "jira_id_b"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ADD "jira_id_b" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" DROP COLUMN "jira_id_a"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ADD "jira_id_a" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_relationships" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "members"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "members" integer array NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "editors"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "editors" integer array NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "viewers"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "viewers" integer array NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "viewer_authz_policy"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "viewer_authz_policy" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP CONSTRAINT "PK_499129a169a8cb18d7a11196978"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" DROP COLUMN "time_series_id"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD "time_series_id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."calibration_groups" ADD CONSTRAINT "calibration_groups_pkey" PRIMARY KEY ("time_series_id")`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "initial_created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "has_been_updated" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "updated_by"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "updated_by" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "created_by"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "created_by" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comments" ALTER COLUMN "is_resolved" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "parent_id"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "parent_id" bigint`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP CONSTRAINT "PK_25aae70dd0af55a9be5db8bb956"`); | |
await queryRunner.query(`ALTER TABLE "comments" DROP COLUMN "time_series_id"`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD "time_series_id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comments" ADD CONSTRAINT "comments_pkey" PRIMARY KEY ("time_series_id")`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP CONSTRAINT "UQ_2a7a3eae297be9884b56eb9b623"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP COLUMN "created_by"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD "created_by" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP COLUMN "emoji"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD "emoji" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP COLUMN "comment_id"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD "comment_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP CONSTRAINT "PK_d10c03282d5280fe55f0bb67563"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD CONSTRAINT "comment_reactions_pkey" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "UQ_4163b1e02c8205c1d3e6b423ee6"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_6af444ff9352ff8d881e7612a26" PRIMARY KEY ("coaching_category_id", "id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_6af444ff9352ff8d881e7612a26"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_a45c6e66f730b44a46bc405c775" PRIMARY KEY ("employee_id", "coaching_category_id", "id")`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "active" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "active" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_frequency_ms" SET DEFAULT '60000'`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_frequency_ms" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_request_rate_ms" SET DEFAULT '1000'`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_request_rate_ms" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_continuous" SET DEFAULT true`); | |
await queryRunner.query(`ALTER TABLE "integrations" ALTER COLUMN "sync_continuous" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`CREATE SEQUENCE IF NOT EXISTS "rogro"."form_responses_id_seq" OWNED BY "rogro"."form_responses"."id"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."form_responses" ALTER COLUMN "id" SET DEFAULT nextval('"rogro"."form_responses_id_seq"')`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "declined_notes" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "title" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" DROP COLUMN "status"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ADD "status" text NOT NULL DEFAULT 'new'`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "assigned_to" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" DROP COLUMN "form_key"`); | |
await queryRunner.query(`DROP TYPE "rogro"."feedback_requests_form_key_enum"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ADD "form_key" text NOT NULL`); | |
await queryRunner.query(`CREATE SEQUENCE IF NOT EXISTS "rogro"."feedback_requests_id_seq" OWNED BY "rogro"."feedback_requests"."id"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_requests" ALTER COLUMN "id" SET DEFAULT nextval('"rogro"."feedback_requests_id_seq"')`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" DROP COLUMN "org_id"`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ADD "org_id" bigint`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" DROP CONSTRAINT "PK_431c393ee2dcc49381f7825595b"`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" DROP COLUMN "time_series_id"`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ADD "time_series_id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "jira_tickets" ADD CONSTRAINT "jira_tickets_pkey" PRIMARY KEY ("time_series_id")`); | |
await queryRunner.query(`ALTER TABLE "meeting_rooms" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "meeting_rooms" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" DROP COLUMN "addl_context"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" ADD "addl_context" character varying`); | |
await queryRunner.query(`ALTER TABLE "rogro"."performance_ratings" DROP CONSTRAINT "UQ_250cd65b031bb2c5e7347233d14"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "roundup_email_active" SET DEFAULT true`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "workday_sync_active" SET DEFAULT true`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "status" SET DEFAULT 'Pending'`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "rogro_conversations_period_active" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "manager_evaluations_for_manual_release" SET DEFAULT ARRAY[]`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "manager_adjustment_active" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "upward_feedback_survey_url" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "upward_feedback_survey_id" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "calibration_phase" SET DEFAULT 'Inactive'`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "peer_feedback_active" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "manager_evaluation_active" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "rogro"."feedback_cycles" ALTER COLUMN "self_reflection_active" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" DROP COLUMN "stack_tied"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ADD "stack_tied" integer array NOT NULL DEFAULT ARRAY[]`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" DROP COLUMN "stack_rank"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ADD "stack_rank" integer array NOT NULL DEFAULT ARRAY[]`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" DROP COLUMN "type"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ADD "type" character varying NOT NULL DEFAULT 'PAIRWISE'`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ALTER COLUMN "num_completed" SET DEFAULT '0'`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ALTER COLUMN "completed" SET DEFAULT (0)`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_graders" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" DROP COLUMN "type"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ADD "type" character varying NOT NULL DEFAULT 'PAIRWISE'`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" DROP COLUMN "targets"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ADD "targets" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" DROP COLUMN "graders"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."pairwise_sessions" ADD "graders" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" DROP COLUMN "comp_level"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private" ADD "comp_level" text`); | |
await queryRunner.query(`ALTER TABLE "sessions" DROP CONSTRAINT "PK_3238ef96f18b355b671619111bc"`); | |
await queryRunner.query(`ALTER TABLE "sessions" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "sessions" ADD "id" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "sessions" ADD CONSTRAINT "PK_3238ef96f18b355b671619111bc" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "sessions" ALTER COLUMN "expired_at" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private_not_time_sliced" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private_not_time_sliced" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private_not_time_sliced" DROP COLUMN "new_hire_comp_level"`); | |
await queryRunner.query(`ALTER TABLE "rogro"."rogro_employees_private_not_time_sliced" ADD "new_hire_comp_level" text`); | |
await queryRunner.query(`ALTER TABLE "settings" DROP COLUMN "updated_at"`); | |
await queryRunner.query(`ALTER TABLE "settings" ADD "updated_at" TIMESTAMP NOT NULL DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "settings" DROP COLUMN "created_at"`); | |
await queryRunner.query(`ALTER TABLE "settings" ADD "created_at" TIMESTAMP NOT NULL DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "settings" ALTER COLUMN "value_text" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "settings" DROP COLUMN "tags"`); | |
await queryRunner.query(`ALTER TABLE "settings" ADD "tags" text array NOT NULL DEFAULT ARRAY[]`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "snapshots" DROP COLUMN "org_schema"`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ADD "org_schema" text`); | |
await queryRunner.query(`ALTER TABLE "snapshots" DROP COLUMN "applies_to"`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ADD "applies_to" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ALTER COLUMN "snapshot_date" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "snapshots" DROP COLUMN "okta_uid"`); | |
await queryRunner.query(`ALTER TABLE "snapshots" ADD "okta_uid" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "tasks" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "tasks" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "tasks" ALTER COLUMN "integration_id" DROP DEFAULT`); | |
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "last_seen" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "okta_email"`); | |
await queryRunner.query(`ALTER TABLE "users" ADD "okta_email" character varying NOT NULL`); | |
await queryRunner.query(`CREATE INDEX "IDX_4f16408e336e6a7356a5a51b0f" ON "users" ("okta_email") `); | |
await queryRunner.query(`ALTER TABLE "users" DROP CONSTRAINT "PK_454e4c058b601a415df1d8de535"`); | |
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "okta_uid"`); | |
await queryRunner.query(`ALTER TABLE "users" ADD "okta_uid" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "users" ADD CONSTRAINT "PK_454e4c058b601a415df1d8de535" PRIMARY KEY ("okta_uid")`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" ALTER COLUMN "last_viewed_at" SET DEFAULT CURRENT_TIMESTAMP`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP`); | |
await queryRunner.query(`ALTER TABLE "saved_views" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "saved_views" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "saved_views" ALTER COLUMN "share_key" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "user_preferences" DROP COLUMN "applies_to"`); | |
await queryRunner.query(`ALTER TABLE "user_preferences" ADD "applies_to" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "user_preferences" DROP COLUMN "okta_uid"`); | |
await queryRunner.query(`ALTER TABLE "user_preferences" ADD "okta_uid" character varying NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "org_schema"`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "org_schema" text`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "level_id"`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "level_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "parent_id"`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "parent_id" bigint`); | |
await queryRunner.query(`ALTER TABLE "orgs" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "org_links" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_links" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_links" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_links" DROP COLUMN "org_id"`); | |
await queryRunner.query(`ALTER TABLE "org_links" ADD "org_id" bigint NOT NULL`); | |
await queryRunner.query(`CREATE SEQUENCE IF NOT EXISTS "org_links_id_seq" OWNED BY "org_links"."id"`); | |
await queryRunner.query(`ALTER TABLE "org_links" ALTER COLUMN "id" SET DEFAULT nextval('"org_links_id_seq"')`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ALTER COLUMN "depth" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "org_levels" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "org_levels" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" DROP COLUMN "updated_by"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ADD "updated_by" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "status" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ALTER COLUMN "body" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" DROP COLUMN "archived_okr_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ADD "archived_okr_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okr_progress_updates" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "management_chain"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "management_chain" character varying(255)`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_profile_start_date"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_profile_start_date" TIMESTAMP`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "slack_id"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "slack_id" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "pronouns"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "pronouns" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "slack_avatar_url"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "slack_avatar_url" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "report_group"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "report_group" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "seat"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "seat" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "floor"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "floor" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "building"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "building" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "company"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "company" text`); | |
await queryRunner.query(`ALTER TABLE "employees" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "employees" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "employees" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_family3"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_family3" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_family2"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_family2" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_family1"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_family1" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "job_family0"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "job_family0" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "office_location"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "office_location" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "remote_status"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "remote_status" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "org_id"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "org_id" bigint`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP COLUMN "location_country_code"`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "location_country_code" text`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "UQ_765bc1ac8967533a04c74a9f6af"`); | |
await queryRunner.query(`ALTER TABLE "employees" DROP CONSTRAINT "UQ_b9535a98350d5b26e7eb0c26af4"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP COLUMN "role_id"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD "role_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP COLUMN "org_id"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD "org_id" bigint NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "orgs_employees" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "org_roles" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_roles" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_roles" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "org_roles" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "org_roles" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ALTER COLUMN "survey_data_streak" SET DEFAULT '0'`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ALTER COLUMN "birthday_consent" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" DROP COLUMN "domains"`); | |
await queryRunner.query(`ALTER TABLE "employees_extra" ADD "domains" character varying(255)`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "compact_name"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "compact_name" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "priority_name"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "priority_name" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "priority_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "priority_id" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "org_schema"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "org_schema" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP CONSTRAINT "UQ_1e83af2fe650ea0dd291ab7c6b7"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "parent_jira_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "parent_jira_id" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "name"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "name" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "status_name"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "status_name" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "status_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "status_id" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "jira_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "jira_id" text NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP CONSTRAINT "UQ_4dea34b152a7ce2f24ce64099da"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ALTER COLUMN "valid_from" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ALTER COLUMN "updated_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP COLUMN "company_objective_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD "company_objective_id" bigint`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ALTER COLUMN "is_flagged" SET DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP COLUMN "jira_advanced_roadmap_link"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD "jira_advanced_roadmap_link" text`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP CONSTRAINT "PK_c0606adc8e024ccd6a2f73a7375"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" DROP COLUMN "time_series_id"`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD "time_series_id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "archived_okrs_extra" ADD CONSTRAINT "archived_okrs_extra_pkey" PRIMARY KEY ("time_series_id")`); | |
await queryRunner.query(`ALTER TABLE "company_objective" ALTER COLUMN "created_at" SET DEFAULT now()`); | |
await queryRunner.query(`ALTER TABLE "company_objective" DROP CONSTRAINT "PK_948ffdfde9434ca150ab8a7c4eb"`); | |
await queryRunner.query(`ALTER TABLE "company_objective" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "company_objective" ADD "id" BIGSERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "company_objective" ADD CONSTRAINT "company_objective_pkey" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_00e92a5cda30b3a4ff0d7c67320"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_a45c6e66f730b44a46bc405c775" PRIMARY KEY ("employee_id", "coaching_category_id", "id")`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_00e92a5cda30b3a4ff0d7c67320"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "tasks" DROP CONSTRAINT "PK_d15e75072717a39f0e36fc057ca"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" DROP COLUMN "id"`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD "id" SERIAL NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "PK_4820b69687d64bdef4daa68dc3c" PRIMARY KEY ("id")`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD "deny_by_default" boolean NOT NULL DEFAULT false`); | |
await queryRunner.query(`ALTER TABLE "api_keys" ADD "prev_id" bigint`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "slack" character varying`); | |
await queryRunner.query(`ALTER TABLE "orgs" ADD "northstar" character varying`); | |
await queryRunner.query(`ALTER TABLE "employees" ADD "is_remote" boolean`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ADD CONSTRAINT "approval_request_external_ent_external_entity_id_external_e_key" UNIQUE ("approval_request_id", "external_entity_id", "external_entity_type")`); | |
await queryRunner.query(`ALTER TABLE "comment_reactions" ADD CONSTRAINT "comment_reactions_comment_id_emoji_created_by_deleted_at_key" UNIQUE ("comment_id", "emoji", "created_by", "deleted_at")`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" ADD CONSTRAINT "unique_employee_saved_view" UNIQUE ("employee_id", "saved_view_id")`); | |
await queryRunner.query(`CREATE INDEX "scorecards_interview_idx" ON "rosetr"."scorecards" ("interview") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "idx_widget_instances_unique" ON "widget_instances" ("widget_id", "employee_id", "page_name", "x_pos", "y_pos") `); | |
await queryRunner.query(`CREATE INDEX "idx_widget_instances_employee_page" ON "widget_instances" ("employee_id", "page_name") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_bc563571aceca37319d2137af8" ON "rosetr"."session_candidates" ("session_id", "candidate_id") `); | |
await queryRunner.query(`CREATE INDEX "candidates_gh_application_id_idx" ON "rosetr"."candidates" ("greenhouse_application_id") `); | |
await queryRunner.query(`CREATE INDEX "candidates_gh_candidate_id_idx" ON "rosetr"."candidates" ("greenhouse_candidate_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_34ca886bed6cf617fa97431ca1" ON "rosetr"."sessions" ("committee_id", "date") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_8636a31fc1f4b7094cbf1eec38" ON "rosetr"."committee_members" ("employee_id", "committee_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "rosetr_session_evaluations_candidate_session_reviewer" ON "rosetr"."session_evaluations" ("candidate_id", "reviewer_id", "session_id") `); | |
await queryRunner.query(`CREATE INDEX "emp_emp_cycle_type_unq_idx" ON "rogro"."calibration_notes" ("created_by_employee_id", "employee_id", "type", "feedback_cycle_id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "calibration_notes_valid_to_idx" ON "rogro"."calibration_notes" ("id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "calibration_notes_valid_from_idx" ON "rogro"."calibration_notes" ("id", "valid_from") `); | |
await queryRunner.query(`CREATE INDEX "IDX_63bc0bd9cc2d7ec485f35b541c" ON "rogro"."calibration_notes" ("employee_id", "feedback_cycle_id") `); | |
await queryRunner.query(`CREATE INDEX "archived_okr_relationships_issue_link_id_idx" ON "archived_okr_relationships" ("issue_link_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "archived_okr_relationships_jira_id_a_jira_id_b_unq" ON "archived_okr_relationships" ("jira_id_a", "jira_id_b", "relationship_type", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "calibration_groups_id_valid_to_idx" ON "rogro"."calibration_groups" ("id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "calibration_groups_id_valid_from_idx" ON "rogro"."calibration_groups" ("id", "valid_from") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "name_unq_idx" ON "rogro"."calibration_groups" ("name", "cycle_id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "comments_id_valid_to_idx" ON "comments" ("id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "comments_id_valid_from_valid_to_idx" ON "comments" ("id", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "comment_reactions_comment_id_idx" ON "comment_reactions" ("comment_id", "emoji", "created_by") WHERE (deleted_at IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_00e92a5cda30b3a4ff0d7c6732" ON "employee_coaching_categories" ("employee_id", "coaching_category_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "form_responses_feedback_request_id_idx" ON "rogro"."form_responses" ("question_name", "feedback_request_id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "form_responses_id_valid_to_idx" ON "rogro"."form_responses" ("id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "form_responses_id_valid_from_idx" ON "rogro"."form_responses" ("id", "valid_from") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "feedback_requests_id_valid_to_idx" ON "rogro"."feedback_requests" ("id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "feedback_requests_id_valid_from_idx" ON "rogro"."feedback_requests" ("id", "valid_from") `); | |
await queryRunner.query(`CREATE INDEX "feedback_requests_assigned_by_id_idx" ON "rogro"."feedback_requests" ("assigned_by") `); | |
await queryRunner.query(`CREATE INDEX "feedback_requests_assigned_to_id_idx" ON "rogro"."feedback_requests" ("assigned_to") `); | |
await queryRunner.query(`CREATE INDEX "feedback_requests_review_id_idx" ON "rogro"."feedback_requests" ("review_subject_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "jira_tickets_jira_id_valid_to_idx" ON "jira_tickets" ("jira_id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "jira_tickets_id_valid_to_idx" ON "jira_tickets" ("id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "jira_tickets_id_valid_from_valid_to_idx" ON "jira_tickets" ("id", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE INDEX "IDX_915d955e2e421d70d730e15120" ON "meeting_rooms" ("room") `); | |
await queryRunner.query(`CREATE INDEX "IDX_39b57dd7d6cfdd6e467a98c411" ON "meeting_rooms" ("floor") `); | |
await queryRunner.query(`CREATE INDEX "IDX_7f68e3342754d2f644e0942668" ON "meeting_rooms" ("building") `); | |
await queryRunner.query(`CREATE INDEX "IDX_8a181763fd38b0df3fbbce773f" ON "meeting_rooms" ("office") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "performance_ratings_id_valid_to_idx" ON "rogro"."performance_ratings" ("id") WHERE (valid_to IS NULL)`); | |
await queryRunner.query(`CREATE UNIQUE INDEX "performance_ratings_id_valid_from_idx" ON "rogro"."performance_ratings" ("id", "valid_from") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "rogro_employees_private_unq" ON "rogro"."rogro_employees_private" ("id", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE INDEX "IDX_1bcdf26261a7261a98d782d807" ON "survey_question" ("last_date") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "idx_tasks_unique" ON "tasks" ("employee_id", "integration_id", "external_task_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "share_key_unq_idx" ON "saved_views" ("share_key") `); | |
await queryRunner.query(`CREATE INDEX "IDX_b0382466cec934c23f69f188cf" ON "saved_views" ("created_by_employee_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "idx_user_preferences_okta_uid_applies_to" ON "user_preferences" ("okta_uid", "applies_to") `); | |
await queryRunner.query(`CREATE INDEX "IDX_7f62efc40e39a1ac427389b5ee" ON "user_preferences" ("okta_uid") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "orgs_id_unq" ON "orgs" ("id", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "org_links_unique" ON "org_links" ("org_id", "kind", "title", "url", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE INDEX "idx_org_links_org_id" ON "org_links" ("org_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "org_levels_name_unq" ON "org_levels" ("name", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "archived_okr_progress_updates_archived_okr_id_valid_from_valid_" ON "archived_okr_progress_updates" ("archived_okr_id", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE INDEX "employees_email_valid_idx" ON "employees" ("email", "valid_to") `); | |
await queryRunner.query(`CREATE INDEX "employees_id_valid_to_idx" ON "employees" ("id", "valid_to") `); | |
await queryRunner.query(`CREATE INDEX "employees_valid_to_idx" ON "employees" ("valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "employees_email_unq" ON "employees" ("email", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "employees_id_unq" ON "employees" ("id", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "orgs_employees_key_unq" ON "orgs_employees" ("key", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE INDEX "IDX_2690da0daf8277189c101af145" ON "orgs_employees" ("org_id", "employee_id") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "org_roles_name_unq" ON "org_roles" ("name", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "archived_okrs_jira_id_unq" ON "archived_okrs" ("jira_id", "valid_from", "valid_to") `); | |
await queryRunner.query(`CREATE UNIQUE INDEX "archived_okrs_extra_id_valid_from_valid_to_idx" ON "archived_okrs_extra" ("id", "valid_from", "valid_to") `); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" ADD CONSTRAINT "scorecards_overall_rec_id_fkey" FOREIGN KEY ("overall_rec_id") REFERENCES "rosetr"."scorecard_rec_vals"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "rosetr"."scorecards" ADD CONSTRAINT "scorecards_interviewer_id_fkey" FOREIGN KEY ("interviewer_id") REFERENCES "rosetr"."interviewers"("greenhouse_user_id") ON DELETE CASCADE ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "widget_instances" ADD CONSTRAINT "widget_instances_widget_id_fkey" FOREIGN KEY ("widget_id") REFERENCES "widgets"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_user_events" ADD CONSTRAINT "fk_approval_request_id" FOREIGN KEY ("approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id") REFERENCES "approval"."approval_requests"("id","id","id","id","id","id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ADD CONSTRAINT "fk_approval_task_id" FOREIGN KEY ("approval_task_id") REFERENCES "approval"."approval_request_tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."task_approver_inputs" ADD CONSTRAINT "fk_approver_input_step_id" FOREIGN KEY ("approver_input_step_id") REFERENCES "approval"."approver_input_steps"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ADD CONSTRAINT "fk_approval_request_node_id" FOREIGN KEY ("approval_request_node_id") REFERENCES "approval"."approval_request_nodes"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_tasks" ADD CONSTRAINT "fk_approval_request_id" FOREIGN KEY ("approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id") REFERENCES "approval"."approval_requests"("id","id","id","id","id","id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_requests" ADD CONSTRAINT "fk_approval_type_id_version" FOREIGN KEY ("approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version") REFERENCES "approval"."approval_types"("id","version","id","version","id","version","id","version") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ADD CONSTRAINT "fk_approval_request_id" FOREIGN KEY ("approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id") REFERENCES "approval"."approval_requests"("id","id","id","id","id","id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_inputs" ADD CONSTRAINT "fk_requester_input_step_id" FOREIGN KEY ("requester_input_step_id") REFERENCES "approval"."requester_input_steps"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."requester_input_steps" ADD CONSTRAINT "fk_approval_type_id_version" FOREIGN KEY ("approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version") REFERENCES "approval"."approval_types"("id","version","id","version","id","version","id","version") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_nodes" ADD CONSTRAINT "fk_approval_type_id_version" FOREIGN KEY ("approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version") REFERENCES "approval"."approval_types"("id","version","id","version","id","version","id","version") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approver_input_steps" ADD CONSTRAINT "fk_approval_type_node_id" FOREIGN KEY ("approval_type_node_id", "approval_type_node_id") REFERENCES "approval"."approval_type_nodes"("id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ADD CONSTRAINT "fk_approval_type_node_id" FOREIGN KEY ("approval_type_node_id", "approval_type_node_id") REFERENCES "approval"."approval_type_nodes"("id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_nodes" ADD CONSTRAINT "fk_approval_request_id" FOREIGN KEY ("approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id") REFERENCES "approval"."approval_requests"("id","id","id","id","id","id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_type_config" ADD CONSTRAINT "fk_approval_type_id_version" FOREIGN KEY ("approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version", "approval_type_id", "approval_type_version") REFERENCES "approval"."approval_types"("id","version","id","version","id","version","id","version") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_external_entities" ADD CONSTRAINT "fk_approval_request_id" FOREIGN KEY ("approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id") REFERENCES "approval"."approval_requests"("id","id","id","id","id","id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_comments" ADD CONSTRAINT "fk_approval_request_id" FOREIGN KEY ("approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id") REFERENCES "approval"."approval_requests"("id","id","id","id","id","id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "approval"."approval_request_action_errors" ADD CONSTRAINT "fk_approval_request_id" FOREIGN KEY ("approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id", "approval_request_id") REFERENCES "approval"."approval_requests"("id","id","id","id","id","id","id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "employee_coaching_categories" ADD CONSTRAINT "FK_4163b1e02c8205c1d3e6b423ee6" FOREIGN KEY ("coaching_category_id") REFERENCES "coaching_categories"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "visited_shared_views" ADD CONSTRAINT "fk_saved_view" FOREIGN KEY ("saved_view_id") REFERENCES "saved_views"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); | |
await queryRunner.query(`ALTER TABLE "coaching_categories" ADD CONSTRAINT "FK_b82341e647d8fb6f634382a7036" FOREIGN KEY ("coaching_group_id") REFERENCES "coaching_groups"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment