@kipicore/dbcore 1.1.55 → 1.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/errorMessages.d.ts +7 -0
- package/dist/constants/errorMessages.js +9 -1
- package/dist/constants/successMessages.d.ts +6 -0
- package/dist/constants/successMessages.js +8 -1
- package/dist/db/psql/migrations/20251009040003-create-working-shift-days.d.ts +2 -0
- package/dist/db/psql/migrations/20251009040003-create-working-shift-days.js +181 -0
- package/dist/db/psql/migrations/20251009042557-create-or-update-academic-calendars.js +155 -0
- package/dist/db/psql/migrations/20251009043250-working_days.js +170 -0
- package/dist/db/psql/migrations/20251009044907-wallets.js +166 -0
- package/dist/db/psql/migrations/20251009045350-wallet_history.js +206 -0
- package/dist/db/psql/migrations/20251009045749-vendor_management.js +236 -0
- package/dist/db/psql/migrations/20251009050216-vehicles.js +180 -0
- package/dist/db/psql/migrations/20251009050518-UserRequiredSteps.js +152 -0
- package/dist/db/psql/migrations/20251009051027-user_project_assessment_options.js +174 -0
- package/dist/db/psql/migrations/20251009052015-user_payouts.js +180 -0
- package/dist/db/psql/migrations/20251009052646-user_payout_history.js +242 -0
- package/dist/db/psql/migrations/20251009052911-user_payout_details.js +132 -0
- package/dist/db/psql/migrations/20251009053200-users.d.ts +2 -0
- package/dist/db/psql/migrations/20251009053200-users.js +206 -0
- package/dist/db/psql/migrations/20251009053408-user_leave_request.d.ts +2 -0
- package/dist/db/psql/migrations/20251009053408-user_leave_request.js +206 -0
- package/dist/db/psql/migrations/20251009053639-user_has_subject_fee.d.ts +2 -0
- package/dist/db/psql/migrations/20251009053639-user_has_subject_fee.js +158 -0
- package/dist/db/psql/migrations/20251009053847-user_has_storage.d.ts +2 -0
- package/dist/db/psql/migrations/20251009053847-user_has_storage.js +172 -0
- package/dist/db/psql/migrations/20251009054048-user_has_roll_number.d.ts +2 -0
- package/dist/db/psql/migrations/20251009054048-user_has_roll_number.js +150 -0
- package/dist/db/psql/migrations/20251009054308-user_has_roles.d.ts +2 -0
- package/dist/db/psql/migrations/20251009054308-user_has_roles.js +150 -0
- package/dist/db/psql/migrations/20251009054554-user_has_parents.d.ts +2 -0
- package/dist/db/psql/migrations/20251009054554-user_has_parents.js +215 -0
- package/dist/db/psql/migrations/20251009054748-user_has_offers.d.ts +2 -0
- package/dist/db/psql/migrations/20251009054748-user_has_offers.js +172 -0
- package/dist/db/psql/migrations/20251009055140-user_has_leave.d.ts +2 -0
- package/dist/db/psql/migrations/20251009055140-user_has_leave.js +184 -0
- package/dist/db/psql/migrations/20251009055325-user_has_leave_history.d.ts +2 -0
- package/dist/db/psql/migrations/20251009055325-user_has_leave_history.js +218 -0
- package/dist/db/psql/migrations/20251009055540-user_has_inventory.d.ts +2 -0
- package/dist/db/psql/migrations/20251009055540-user_has_inventory.js +278 -0
- package/dist/db/psql/migrations/20251009060053-user_has_inventory_history.d.ts +2 -0
- package/dist/db/psql/migrations/20251009060053-user_has_inventory_history.js +270 -0
- package/dist/db/psql/migrations/20251009060301-user_has_home_work.d.ts +2 -0
- package/dist/db/psql/migrations/20251009060301-user_has_home_work.js +172 -0
- package/dist/db/psql/migrations/20251009060506-user_has_files.d.ts +2 -0
- package/dist/db/psql/migrations/20251009060506-user_has_files.js +173 -0
- package/dist/db/psql/migrations/20251009060732-create_account_has_receipt_details.d.ts +2 -0
- package/dist/db/psql/migrations/20251009060732-create_account_has_receipt_details.js +228 -0
- package/dist/db/psql/migrations/20251009060734-user_has_fee_terms.d.ts +2 -0
- package/dist/db/psql/migrations/20251009060734-user_has_fee_terms.js +240 -0
- package/dist/db/psql/migrations/20251009061032-user_has_device.d.ts +2 -0
- package/dist/db/psql/migrations/20251009061032-user_has_device.js +168 -0
- package/dist/db/psql/migrations/20251009061450-announcementes.d.ts +2 -0
- package/dist/db/psql/migrations/20251009061450-announcementes.js +236 -0
- package/dist/db/psql/migrations/20251009061917-userHasUserHasCourses.d.ts +2 -0
- package/dist/db/psql/migrations/20251009061917-userHasUserHasCourses.js +192 -0
- package/dist/db/psql/migrations/20251009061943-areas.d.ts +2 -0
- package/dist/db/psql/migrations/20251009061943-areas.js +130 -0
- package/dist/db/psql/migrations/20251009062112-user_has_batches.d.ts +2 -0
- package/dist/db/psql/migrations/20251009062112-user_has_batches.js +140 -0
- package/dist/db/psql/migrations/20251009062317-user_has_announcementes.d.ts +2 -0
- package/dist/db/psql/migrations/20251009062317-user_has_announcementes.js +150 -0
- package/dist/db/psql/migrations/20251009062408-bank_account_details.d.ts +2 -0
- package/dist/db/psql/migrations/20251009062408-bank_account_details.js +204 -0
- package/dist/db/psql/migrations/20251009062523-user_fee_types.d.ts +2 -0
- package/dist/db/psql/migrations/20251009062523-user_fee_types.js +216 -0
- package/dist/db/psql/migrations/20251009062708-user_fee_type_by_account.d.ts +2 -0
- package/dist/db/psql/migrations/20251009062708-user_fee_type_by_account.js +198 -0
- package/dist/db/psql/migrations/20251009062844-user_book_assessments.d.ts +2 -0
- package/dist/db/psql/migrations/20251009062844-user_book_assessments.js +174 -0
- package/dist/db/psql/migrations/20251009063105-type_management.d.ts +2 -0
- package/dist/db/psql/migrations/20251009063105-type_management.js +170 -0
- package/dist/db/psql/migrations/20251009063225-batches.d.ts +2 -0
- package/dist/db/psql/migrations/20251009063225-batches.js +240 -0
- package/dist/db/psql/migrations/20251009063427-trips.d.ts +2 -0
- package/dist/db/psql/migrations/20251009063427-trips.js +188 -0
- package/dist/db/psql/migrations/20251009063619-tokens.d.ts +2 -0
- package/dist/db/psql/migrations/20251009063619-tokens.js +144 -0
- package/dist/db/psql/migrations/20251009063849-toDos.d.ts +2 -0
- package/dist/db/psql/migrations/20251009063849-toDos.js +168 -0
- package/dist/db/psql/migrations/20251009064034-testimonials.d.ts +2 -0
- package/dist/db/psql/migrations/20251009064034-testimonials.js +178 -0
- package/dist/db/psql/migrations/20251009064240-syllabus.d.ts +2 -0
- package/dist/db/psql/migrations/20251009064240-syllabus.js +150 -0
- package/dist/db/psql/migrations/20251009064430-subject_has_pay_fee_history.d.ts +2 -0
- package/dist/db/psql/migrations/20251009064430-subject_has_pay_fee_history.js +158 -0
- package/dist/db/psql/migrations/20251009064531-batch_subject_book_assessments.d.ts +2 -0
- package/dist/db/psql/migrations/20251009064531-batch_subject_book_assessments.js +180 -0
- package/dist/db/psql/migrations/20251009064601-subject_has_fee.d.ts +2 -0
- package/dist/db/psql/migrations/20251009064601-subject_has_fee.js +138 -0
- package/dist/db/psql/migrations/20251009064917-sub_categories.d.ts +2 -0
- package/dist/db/psql/migrations/20251009064917-sub_categories.js +148 -0
- package/dist/db/psql/migrations/20251009065111-states.d.ts +2 -0
- package/dist/db/psql/migrations/20251009065111-states.js +150 -0
- package/dist/db/psql/migrations/20251009065230-batch_subject_project_assessments.d.ts +2 -0
- package/dist/db/psql/migrations/20251009065230-batch_subject_project_assessments.js +190 -0
- package/dist/db/psql/migrations/20251009065230-slots.d.ts +2 -0
- package/dist/db/psql/migrations/20251009065230-slots.js +152 -0
- package/dist/db/psql/migrations/20251009070114-notifications.d.ts +2 -0
- package/dist/db/psql/migrations/20251009070114-notifications.js +184 -0
- package/dist/db/psql/migrations/20251009070125-book_assessment_dates.d.ts +2 -0
- package/dist/db/psql/migrations/20251009070125-book_assessment_dates.js +152 -0
- package/dist/db/psql/migrations/20251009070250-school_offers.d.ts +2 -0
- package/dist/db/psql/migrations/20251009070250-school_offers.js +260 -0
- package/dist/db/psql/migrations/20251009070502-school_fee_collection.d.ts +2 -0
- package/dist/db/psql/migrations/20251009070502-school_fee_collection.js +202 -0
- package/dist/db/psql/migrations/20251009070735-rules_and_regulation.d.ts +2 -0
- package/dist/db/psql/migrations/20251009070735-rules_and_regulation.js +156 -0
- package/dist/db/psql/migrations/20251009070904-roles.d.ts +2 -0
- package/dist/db/psql/migrations/20251009070904-roles.js +184 -0
- package/dist/db/psql/migrations/20251009071136-project_assessment_options.d.ts +2 -0
- package/dist/db/psql/migrations/20251009071136-project_assessment_options.js +162 -0
- package/dist/db/psql/migrations/20251009071433-products.d.ts +2 -0
- package/dist/db/psql/migrations/20251009071433-products.js +158 -0
- package/dist/db/psql/migrations/20251009071615-pincodes.d.ts +2 -0
- package/dist/db/psql/migrations/20251009071615-pincodes.js +210 -0
- package/dist/db/psql/migrations/20251009071744-pdc_history.d.ts +2 -0
- package/dist/db/psql/migrations/20251009071744-pdc_history.js +226 -0
- package/dist/db/psql/migrations/20251009071958-pdcCheques.d.ts +2 -0
- package/dist/db/psql/migrations/20251009071958-pdcCheques.js +216 -0
- package/dist/db/psql/migrations/20251009072138-payment_terms.d.ts +2 -0
- package/dist/db/psql/migrations/20251009072138-payment_terms.js +208 -0
- package/dist/db/psql/migrations/20251009072258-offers.d.ts +2 -0
- package/dist/db/psql/migrations/20251009072258-offers.js +240 -0
- package/dist/db/psql/migrations/20251009072415-categories.d.ts +2 -0
- package/dist/db/psql/migrations/20251009072415-categories.js +138 -0
- package/dist/db/psql/migrations/20251009072447-modules.d.ts +2 -0
- package/dist/db/psql/migrations/20251009072447-modules.js +168 -0
- package/dist/db/psql/migrations/20251009072840-module_features.d.ts +2 -0
- package/dist/db/psql/migrations/20251009072840-module_features.js +178 -0
- package/dist/db/psql/migrations/20251009073048-cities.d.ts +2 -0
- package/dist/db/psql/migrations/20251009073048-cities.js +148 -0
- package/dist/db/psql/migrations/20251009073128-master_leaves.d.ts +2 -0
- package/dist/db/psql/migrations/20251009073128-master_leaves.js +192 -0
- package/dist/db/psql/migrations/20251009073333-lectures.d.ts +2 -0
- package/dist/db/psql/migrations/20251009073333-lectures.js +150 -0
- package/dist/db/psql/migrations/20251009073526-lecture_history.d.ts +2 -0
- package/dist/db/psql/migrations/20251009073526-lecture_history.js +156 -0
- package/dist/db/psql/migrations/20251009073655-inventory.d.ts +2 -0
- package/dist/db/psql/migrations/20251009073655-inventory.js +208 -0
- package/dist/db/psql/migrations/20251009073859-inventory_history.d.ts +2 -0
- package/dist/db/psql/migrations/20251009073859-inventory_history.js +226 -0
- package/dist/db/psql/migrations/20251009074039-institute_subscription_plans.d.ts +2 -0
- package/dist/db/psql/migrations/20251009074039-institute_subscription_plans.js +280 -0
- package/dist/db/psql/migrations/20251009074217-institutes.d.ts +2 -0
- package/dist/db/psql/migrations/20251009074217-institutes.js +222 -0
- package/dist/db/psql/migrations/20251009074350-institute_entity_types.d.ts +2 -0
- package/dist/db/psql/migrations/20251009074350-institute_entity_types.js +156 -0
- package/dist/db/psql/migrations/20251009074528-institute_entities.d.ts +2 -0
- package/dist/db/psql/migrations/20251009074528-institute_entities.js +204 -0
- package/dist/db/psql/migrations/20251009074701-home_work.d.ts +2 -0
- package/dist/db/psql/migrations/20251009074701-home_work.js +186 -0
- package/dist/db/psql/migrations/20251009074820-greeting.d.ts +2 -0
- package/dist/db/psql/migrations/20251009074820-greeting.js +178 -0
- package/dist/db/psql/migrations/20251009074941-floor_management.d.ts +2 -0
- package/dist/db/psql/migrations/20251009074941-floor_management.js +164 -0
- package/dist/db/psql/migrations/20251009075102-file_storage.d.ts +2 -0
- package/dist/db/psql/migrations/20251009075102-file_storage.js +190 -0
- package/dist/db/psql/migrations/20251009075229-fee_type.d.ts +2 -0
- package/dist/db/psql/migrations/20251009075229-fee_type.js +186 -0
- package/dist/db/psql/migrations/20251009075350-fee_type_has_terms.d.ts +2 -0
- package/dist/db/psql/migrations/20251009075350-fee_type_has_terms.js +174 -0
- package/dist/db/psql/migrations/20251009075519-fees_collections.d.ts +2 -0
- package/dist/db/psql/migrations/20251009075519-fees_collections.js +256 -0
- package/dist/db/psql/migrations/20251009075642-fee_reminder_settings.d.ts +2 -0
- package/dist/db/psql/migrations/20251009075642-fee_reminder_settings.js +160 -0
- package/dist/db/psql/migrations/20251009075804-fee_reminders.d.ts +2 -0
- package/dist/db/psql/migrations/20251009075804-fee_reminders.js +204 -0
- package/dist/db/psql/migrations/20251009075924-fee_history.d.ts +2 -0
- package/dist/db/psql/migrations/20251009075924-fee_history.js +158 -0
- package/dist/db/psql/migrations/20251009082617-class_rooms.d.ts +2 -0
- package/dist/db/psql/migrations/20251009082617-class_rooms.js +188 -0
- package/dist/db/psql/migrations/20251009082910-cloud_storage.d.ts +2 -0
- package/dist/db/psql/migrations/20251009082910-cloud_storage.js +222 -0
- package/dist/db/psql/migrations/20251009083435-coin_purchase_offers.d.ts +2 -0
- package/dist/db/psql/migrations/20251009083435-coin_purchase_offers.js +228 -0
- package/dist/db/psql/migrations/20251009083812-fee_history_details.d.ts +2 -0
- package/dist/db/psql/migrations/20251009083812-fee_history_details.js +230 -0
- package/dist/db/psql/migrations/20251009083949-feature_actions.d.ts +2 -0
- package/dist/db/psql/migrations/20251009083949-feature_actions.js +188 -0
- package/dist/db/psql/migrations/20251009084101-contact_feed_back.d.ts +2 -0
- package/dist/db/psql/migrations/20251009084101-contact_feed_back.js +188 -0
- package/dist/db/psql/migrations/20251009084145-facilities.d.ts +2 -0
- package/dist/db/psql/migrations/20251009084145-facilities.js +148 -0
- package/dist/db/psql/migrations/20251009084446-countries.d.ts +2 -0
- package/dist/db/psql/migrations/20251009084446-countries.js +160 -0
- package/dist/db/psql/migrations/20251009084908-courseHasVisitors.d.ts +2 -0
- package/dist/db/psql/migrations/20251009084908-courseHasVisitors.js +142 -0
- package/dist/db/psql/migrations/20251009085333-courses.d.ts +2 -0
- package/dist/db/psql/migrations/20251009085333-courses.js +242 -0
- package/dist/db/psql/migrations/20251009085654-drivers.d.ts +2 -0
- package/dist/db/psql/migrations/20251009085654-drivers.js +262 -0
- package/dist/db/psql/migrations/20251009090107-entity_group.d.ts +2 -0
- package/dist/db/psql/migrations/20251009090107-entity_group.js +184 -0
- package/dist/db/psql/migrations/20251009093327-banners.d.ts +2 -0
- package/dist/db/psql/migrations/20251009093327-banners.js +214 -0
- package/dist/interfaces/canteenInterface.d.ts +11 -0
- package/dist/interfaces/canteenInterface.js +2 -0
- package/dist/interfaces/coinPurchaseOfferInterface.d.ts +1 -1
- package/dist/interfaces/examInterface.d.ts +1 -0
- package/dist/interfaces/feedBackInterface.d.ts +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/models/mongodb/canteenModel.d.ts +4 -0
- package/dist/models/mongodb/canteenModel.js +63 -0
- package/dist/models/mongodb/examModel.js +4 -0
- package/dist/models/mongodb/feedBackModel.js +3 -0
- package/dist/models/mongodb/index.d.ts +1 -0
- package/dist/models/mongodb/index.js +3 -1
- package/dist/models/psql/coinPurchaseOfferModel.d.ts +1 -1
- package/dist/models/psql/coinPurchaseOfferModel.js +1 -1
- package/dist/models/psql/userHasHomeWorkModel.d.ts +0 -1
- package/dist/models/psql/userHasHomeWorkModel.js +0 -8
- package/dist/types/canteenType.d.ts +2 -0
- package/dist/types/canteenType.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/package.json +1 -1
- package/dist/db/psql/migrations/20241225101052-add-deleted-by-and-deleted-at-fields.d.ts +0 -2
- package/dist/db/psql/migrations/20241225101052-add-deleted-by-and-deleted-at-fields.js +0 -71
- package/dist/db/psql/migrations/20250106070945-add-user-fields-and-deleted-user-fields.d.ts +0 -3
- package/dist/db/psql/migrations/20250106070945-add-user-fields-and-deleted-user-fields.js +0 -33
- package/dist/db/psql/migrations/20250106080059-add-fields-and-deleted-fields.d.ts +0 -3
- package/dist/db/psql/migrations/20250106080059-add-fields-and-deleted-fields.js +0 -94
- package/dist/db/psql/migrations/20250108092439-update-batch-model-fields.d.ts +0 -2
- package/dist/db/psql/migrations/20250108092439-update-batch-model-fields.js +0 -38
- package/dist/db/psql/migrations/20250210102846-add-profileImage-coverImage-to-users.d.ts +0 -3
- package/dist/db/psql/migrations/20250210102846-add-profileImage-coverImage-to-users.js +0 -102
- package/dist/db/psql/migrations/20250211071743-add-action-user-has-histroy.d.ts +0 -3
- package/dist/db/psql/migrations/20250211071743-add-action-user-has-histroy.js +0 -76
- package/dist/db/psql/migrations/20250213140815-add-assignQuantity-user-has-histroy.d.ts +0 -3
- package/dist/db/psql/migrations/20250213140815-add-assignQuantity-user-has-histroy.js +0 -80
- package/dist/db/psql/migrations/20250214072626-add-middlename-user.d.ts +0 -3
- package/dist/db/psql/migrations/20250214072626-add-middlename-user.js +0 -80
- package/dist/db/psql/migrations/20250224085333-add-apptype-in-user.d.ts +0 -3
- package/dist/db/psql/migrations/20250224085333-add-apptype-in-user.js +0 -78
- package/dist/db/psql/migrations/20250226053006-add-brouchure-in-institute.d.ts +0 -3
- package/dist/db/psql/migrations/20250226053006-add-brouchure-in-institute.js +0 -80
- package/dist/db/psql/migrations/20250227123530-add-defult-in-fee-reminder.d.ts +0 -3
- package/dist/db/psql/migrations/20250227123530-add-defult-in-fee-reminder.js +0 -78
- package/dist/db/psql/migrations/20250304052831-add-institued-in-school-data-clm.d.ts +0 -3
- package/dist/db/psql/migrations/20250304052831-add-institued-in-school-data-clm.js +0 -112
- package/dist/db/psql/migrations/20250306053557-add-shifyId-in-batch.d.ts +0 -3
- package/dist/db/psql/migrations/20250306053557-add-shifyId-in-batch.js +0 -86
- package/dist/db/psql/migrations/20250311044606-add-institued-in-school-data-clm-subtype.d.ts +0 -2
- package/dist/db/psql/migrations/20250311044606-add-institued-in-school-data-clm-subtype.js +0 -43
- package/dist/db/psql/migrations/20250402090653-add-user-area.d.ts +0 -3
- package/dist/db/psql/migrations/20250402090653-add-user-area.js +0 -94
- package/dist/db/psql/migrations/20250407094125-update-type-in-typeManagement.d.ts +0 -2
- package/dist/db/psql/migrations/20250407094125-update-type-in-typeManagement.js +0 -64
- package/dist/db/psql/migrations/20250409105229-add-user-type-in-role.d.ts +0 -3
- package/dist/db/psql/migrations/20250409105229-add-user-type-in-role.js +0 -55
- package/dist/db/psql/migrations/20250417121316-make-institute-id-nullable-in-type-management.d.ts +0 -2
- package/dist/db/psql/migrations/20250417121316-make-institute-id-nullable-in-type-management.js +0 -16
- package/dist/db/psql/migrations/20250419071236-fee_histroy_add_school_clm.d.ts +0 -3
- package/dist/db/psql/migrations/20250419071236-fee_histroy_add_school_clm.js +0 -134
- package/dist/db/psql/migrations/20250419085334-fee_histroy_add_school_clm.d.ts +0 -3
- package/dist/db/psql/migrations/20250419085334-fee_histroy_add_school_clm.js +0 -86
- package/dist/db/psql/migrations/20250421085618-add-entityIds-field-in-announcements.d.ts +0 -3
- package/dist/db/psql/migrations/20250421085618-add-entityIds-field-in-announcements.js +0 -81
- package/dist/db/psql/migrations/20250422114032-add-account.d.ts +0 -3
- package/dist/db/psql/migrations/20250422114032-add-account.js +0 -86
- package/dist/db/psql/migrations/20250423051841-add-master-leave-clm.d.ts +0 -3
- package/dist/db/psql/migrations/20250423051841-add-master-leave-clm.js +0 -71
- package/dist/db/psql/migrations/20250423064522-update-calender-enum.d.ts +0 -2
- package/dist/db/psql/migrations/20250423064522-update-calender-enum.js +0 -34
- package/dist/db/psql/migrations/20250423093827-update-institued-district.d.ts +0 -3
- package/dist/db/psql/migrations/20250423093827-update-institued-district.js +0 -78
- package/dist/db/psql/migrations/20250424044755-update-fee-history-feeTyps-clm.d.ts +0 -3
- package/dist/db/psql/migrations/20250424044755-update-fee-history-feeTyps-clm.js +0 -34
- package/dist/db/psql/migrations/20250424053841-update-fee-history-key.d.ts +0 -2
- package/dist/db/psql/migrations/20250424053841-update-fee-history-key.js +0 -35
- package/dist/db/psql/migrations/20250426070309-update-banner-clm-userType.d.ts +0 -3
- package/dist/db/psql/migrations/20250426070309-update-banner-clm-userType.js +0 -55
- package/dist/db/psql/migrations/20250505035157-update-fee-collection-clm-add.d.ts +0 -3
- package/dist/db/psql/migrations/20250505035157-update-fee-collection-clm-add.js +0 -86
- package/dist/db/psql/migrations/20250505082924-update-banner-clm.d.ts +0 -3
- package/dist/db/psql/migrations/20250505082924-update-banner-clm.js +0 -18
- package/dist/db/psql/migrations/20250505094616-about-as-clm-in-institued.d.ts +0 -2
- package/dist/db/psql/migrations/20250505094616-about-as-clm-in-institued.js +0 -16
- package/dist/db/psql/migrations/20250506070110-add-dayOfWeek-clm-in-working-model.d.ts +0 -3
- package/dist/db/psql/migrations/20250506070110-add-dayOfWeek-clm-in-working-model.js +0 -80
- package/dist/db/psql/migrations/20250509055920-add-feecollection-isleft-clm.d.ts +0 -3
- package/dist/db/psql/migrations/20250509055920-add-feecollection-isleft-clm.js +0 -80
- package/dist/db/psql/migrations/20250513061037-add-techer-clm-batch.d.ts +0 -3
- package/dist/db/psql/migrations/20250513061037-add-techer-clm-batch.js +0 -88
- package/dist/db/psql/migrations/20250514101801-add-slotId-workingShif.d.ts +0 -3
- package/dist/db/psql/migrations/20250514101801-add-slotId-workingShif.js +0 -86
- package/dist/db/psql/migrations/20250516062917-add-globalId-clm-user-model.d.ts +0 -3
- package/dist/db/psql/migrations/20250516062917-add-globalId-clm-user-model.js +0 -80
- package/dist/db/psql/migrations/20250516063542-add-globalId-clm-institute-model.d.ts +0 -3
- package/dist/db/psql/migrations/20250516063542-add-globalId-clm-institute-model.js +0 -80
- package/dist/db/psql/migrations/20250520061231-add-institued_mobile_person_data.d.ts +0 -3
- package/dist/db/psql/migrations/20250520061231-add-institued_mobile_person_data.js +0 -116
- package/dist/db/psql/migrations/20250522044729-add-institued_update_add_2.d.ts +0 -2
- package/dist/db/psql/migrations/20250522044729-add-institued_update_add_2.js +0 -16
- package/dist/db/psql/migrations/20250526035543-add-totalQuantity_add_remainingQuantiy_clm_userHasInventoryHistory.d.ts +0 -3
- package/dist/db/psql/migrations/20250526035543-add-totalQuantity_add_remainingQuantiy_clm_userHasInventoryHistory.js +0 -98
- package/dist/db/psql/migrations/20250526093322-add-appType_clm_in_module.d.ts +0 -3
- package/dist/db/psql/migrations/20250526093322-add-appType_clm_in_module.js +0 -80
- package/dist/db/psql/migrations/20250526094030-add-appType_clm_in_action.d.ts +0 -3
- package/dist/db/psql/migrations/20250526094030-add-appType_clm_in_action.js +0 -80
- package/dist/db/psql/migrations/20250526094233-add-appType_clm_in_module_features.d.ts +0 -3
- package/dist/db/psql/migrations/20250526094233-add-appType_clm_in_module_features.js +0 -80
- package/dist/db/psql/migrations/20250527065001-add-app-type-in-role-model.d.ts +0 -3
- package/dist/db/psql/migrations/20250527065001-add-app-type-in-role-model.js +0 -57
- package/dist/db/psql/migrations/20250528045906-add-module-type-to-notifications.d.ts +0 -2
- package/dist/db/psql/migrations/20250528045906-add-module-type-to-notifications.js +0 -13
- package/dist/db/psql/migrations/20250602090331-add-or-update-user-model-medicalHistory.d.ts +0 -3
- package/dist/db/psql/migrations/20250602090331-add-or-update-user-model-medicalHistory.js +0 -107
- package/dist/db/psql/migrations/20250602100550-add-planner-sync-status-to-institute.d.ts +0 -3
- package/dist/db/psql/migrations/20250602100550-add-planner-sync-status-to-institute.js +0 -113
- package/dist/db/psql/migrations/20250603054900-add-clm-for-defult-data-add-or-not-in-ins-model.d.ts +0 -3
- package/dist/db/psql/migrations/20250603054900-add-clm-for-defult-data-add-or-not-in-ins-model.js +0 -80
- package/dist/db/psql/migrations/20250604103905-add-is-institute-default-field-in-role.d.ts +0 -3
- package/dist/db/psql/migrations/20250604103905-add-is-institute-default-field-in-role.js +0 -57
- package/dist/db/psql/migrations/20250604121051-update-mobile-number-opstion.d.ts +0 -3
- package/dist/db/psql/migrations/20250604121051-update-mobile-number-opstion.js +0 -15
- package/dist/db/psql/migrations/20250617064159-update-type-management-jun-17.d.ts +0 -2
- package/dist/db/psql/migrations/20250617064159-update-type-management-jun-17.js +0 -11
- package/dist/db/psql/migrations/20250627065013-is-institute-default-added-type-managemente.js +0 -12
- package/dist/db/psql/migrations/20250701095321-add-clm-institute-pdfId.d.ts +0 -3
- package/dist/db/psql/migrations/20250701095321-add-clm-institute-pdfId.js +0 -57
- package/dist/db/psql/migrations/20250704102117-add-clm-isDefult-in-typeManagemet.js +0 -12
- package/dist/db/psql/migrations/20250715103324-add-academic-calendar-id-to-batches.js +0 -13
- package/dist/db/psql/migrations/20250715121047-remove-batch-id-from-academic-calendars.d.ts +0 -2
- package/dist/db/psql/migrations/20250715121047-remove-batch-id-from-academic-calendars.js +0 -12
- package/dist/db/psql/migrations/20250716131731-rename-user-id-to-primary-user-id.d.ts +0 -2
- package/dist/db/psql/migrations/20250716131731-rename-user-id-to-primary-user-id.js +0 -9
- package/dist/db/psql/migrations/20250717092933-add-floor-id-to-class-rooms.d.ts +0 -3
- package/dist/db/psql/migrations/20250717092933-add-floor-id-to-class-rooms.js +0 -86
- package/dist/db/psql/migrations/20250718121251-add-clm-classroom-typeid.d.ts +0 -3
- package/dist/db/psql/migrations/20250718121251-add-clm-classroom-typeid.js +0 -86
- package/dist/db/psql/migrations/20250721065317-add-instituteId-fileSize-to-fileStorage.js +0 -22
- package/dist/db/psql/migrations/20250721100004-add-shift-slot-id-to-lectures.js +0 -17
- package/dist/db/psql/migrations/20250721105455-add-clm-classroom-add-classroomnumber.d.ts +0 -3
- package/dist/db/psql/migrations/20250721105455-add-clm-classroom-add-classroomnumber.js +0 -78
- package/dist/db/psql/migrations/20250722071836-add-title-to-floor-management.d.ts +0 -2
- package/dist/db/psql/migrations/20250722071836-add-title-to-floor-management.js +0 -14
- package/dist/db/psql/migrations/20250723150111-add-clm-batch-slotId.d.ts +0 -3
- package/dist/db/psql/migrations/20250723150111-add-clm-batch-slotId.js +0 -86
- package/dist/db/psql/migrations/20250724062458-update_classRoom_number_clm_to_string.d.ts +0 -2
- package/dist/db/psql/migrations/20250724062458-update_classRoom_number_clm_to_string.js +0 -15
- package/dist/db/psql/migrations/20250725132424-add-unique-index-on-instituteId-name-type.d.ts +0 -2
- package/dist/db/psql/migrations/20250725132424-add-unique-index-on-instituteId-name-type.js +0 -24
- package/dist/db/psql/migrations/20250730104844-update-unique-key-assessment-type.d.ts +0 -2
- package/dist/db/psql/migrations/20250730104844-update-unique-key-assessment-type.js +0 -30
- package/dist/db/psql/migrations/20250804090437-update_ins_in_pdf_id_string_to_uuid.d.ts +0 -3
- package/dist/db/psql/migrations/20250804090437-update_ins_in_pdf_id_string_to_uuid.js +0 -62
- package/dist/db/psql/migrations/20250805062440-remove_unique_key_into_batch_subject_project_assessments.d.ts +0 -2
- package/dist/db/psql/migrations/20250805062440-remove_unique_key_into_batch_subject_project_assessments.js +0 -21
- package/dist/db/psql/migrations/20250805115805-add-descriptions-to-lectures.js +0 -12
- package/dist/db/psql/migrations/20250808100700-add_clm_contectFeed_in_ins_givenId.d.ts +0 -3
- package/dist/db/psql/migrations/20250808100700-add_clm_contectFeed_in_ins_givenId.js +0 -86
- package/dist/db/psql/migrations/20250808101515-add-sequence-to-institute_entities.js +0 -12
- package/dist/db/psql/migrations/20250812080521-add-title-and-descriptions-to-batch-subject-project-assessments.js +0 -17
- package/dist/db/psql/migrations/20250820092836-add-sequence-number-to-institute-entities.js +0 -15
- package/dist/db/psql/migrations/20250829103203-remove-syllabus-composit-index.d.ts +0 -2
- package/dist/db/psql/migrations/20250829103203-remove-syllabus-composit-index.js +0 -15
- package/dist/db/psql/migrations/20250905132024-add-uuid-to-users.js +0 -12
- package/dist/db/psql/migrations/20250908054025-userHasOffer_model_update.d.ts +0 -3
- package/dist/db/psql/migrations/20250908054025-userHasOffer_model_update.js +0 -112
- package/dist/db/psql/migrations/20250908054754-offer_in_add_offertype_clm.d.ts +0 -3
- package/dist/db/psql/migrations/20250908054754-offer_in_add_offertype_clm.js +0 -70
- package/dist/db/psql/migrations/20250909061117-add-instituteId-isDefault-to-entityGroup.js +0 -17
- package/dist/db/psql/migrations/20250911060106-change-wallet-history-columns-to-float.d.ts +0 -2
- package/dist/db/psql/migrations/20250911060106-change-wallet-history-columns-to-float.js +0 -39
- package/dist/db/psql/migrations/20250911060245-change-coin-to-float-in-wallets.d.ts +0 -2
- package/dist/db/psql/migrations/20250911060245-change-coin-to-float-in-wallets.js +0 -17
- package/dist/db/psql/migrations/20250917135646-change-storageInBytes-to-float.d.ts +0 -2
- package/dist/db/psql/migrations/20250917135646-change-storageInBytes-to-float.js +0 -17
- /package/dist/db/psql/migrations/{20250627065013-is-institute-default-added-type-managemente.d.ts → 20251009042557-create-or-update-academic-calendars.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250704102117-add-clm-isDefult-in-typeManagemet.d.ts → 20251009043250-working_days.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250715103324-add-academic-calendar-id-to-batches.d.ts → 20251009044907-wallets.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250721065317-add-instituteId-fileSize-to-fileStorage.d.ts → 20251009045350-wallet_history.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250721100004-add-shift-slot-id-to-lectures.d.ts → 20251009045749-vendor_management.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250805115805-add-descriptions-to-lectures.d.ts → 20251009050216-vehicles.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250808101515-add-sequence-to-institute_entities.d.ts → 20251009050518-UserRequiredSteps.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250812080521-add-title-and-descriptions-to-batch-subject-project-assessments.d.ts → 20251009051027-user_project_assessment_options.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250820092836-add-sequence-number-to-institute-entities.d.ts → 20251009052015-user_payouts.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250905132024-add-uuid-to-users.d.ts → 20251009052646-user_payout_history.d.ts} +0 -0
- /package/dist/db/psql/migrations/{20250909061117-add-instituteId-isDefault-to-entityGroup.d.ts → 20251009052911-user_payout_details.d.ts} +0 -0
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
-
const up = async (queryInterface, Sequelize) => {
|
|
4
|
-
const dataTables = [
|
|
5
|
-
{
|
|
6
|
-
tableName: 'class_rooms',
|
|
7
|
-
addFields: [
|
|
8
|
-
{
|
|
9
|
-
fieldName: 'typeManagementId',
|
|
10
|
-
type: {
|
|
11
|
-
type: Sequelize.UUID,
|
|
12
|
-
allowNull: true,
|
|
13
|
-
field: 'type_management_id',
|
|
14
|
-
ref: {
|
|
15
|
-
model: 'type_management',
|
|
16
|
-
key: 'id',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
updateFields: [],
|
|
22
|
-
deleteFields: [],
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
for (const table of dataTables) {
|
|
26
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
27
|
-
for (const field of table.addFields) {
|
|
28
|
-
const columnName = field.type.field || field.fieldName;
|
|
29
|
-
if (!tableDescription[columnName]) {
|
|
30
|
-
await queryInterface.addColumn(table.tableName, columnName, field.type);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
for (const field of table.updateFields) {
|
|
34
|
-
const columnName = field.type.field || field.fieldName;
|
|
35
|
-
if (tableDescription[columnName]) {
|
|
36
|
-
await queryInterface.changeColumn(table.tableName, columnName, field.type);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
for (const field of table.deleteFields) {
|
|
40
|
-
const columnName = field.type.field || field.fieldName;
|
|
41
|
-
if (tableDescription[columnName]) {
|
|
42
|
-
await queryInterface.removeColumn(table.tableName, columnName);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const down = async (queryInterface, Sequelize) => {
|
|
48
|
-
const dataTables = [
|
|
49
|
-
{
|
|
50
|
-
tableName: 'class_rooms',
|
|
51
|
-
addFields: [
|
|
52
|
-
{
|
|
53
|
-
fieldName: 'typeManagementId',
|
|
54
|
-
type: {
|
|
55
|
-
type: Sequelize.UUID,
|
|
56
|
-
allowNull: true,
|
|
57
|
-
field: 'type_management_id',
|
|
58
|
-
ref: {
|
|
59
|
-
model: 'type_management',
|
|
60
|
-
key: 'id',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
updateFields: [],
|
|
66
|
-
deleteFields: [],
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
for (const table of dataTables) {
|
|
70
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
71
|
-
for (const field of table.addFields) {
|
|
72
|
-
const columnName = field.type.field || field.fieldName;
|
|
73
|
-
if (tableDescription[columnName]) {
|
|
74
|
-
await queryInterface.removeColumn(table.tableName, columnName);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Add deleted fields back (if necessary)
|
|
78
|
-
for (const field of table.deleteFields) {
|
|
79
|
-
const columnName = field.type.field || field.fieldName;
|
|
80
|
-
if (!tableDescription[columnName]) {
|
|
81
|
-
await queryInterface.addColumn(table.tableName, columnName, field.type);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
module.exports = { up, down };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
await queryInterface.addColumn('file_storage', 'institute_id', {
|
|
5
|
-
type: Sequelize.UUID,
|
|
6
|
-
allowNull: true,
|
|
7
|
-
});
|
|
8
|
-
await queryInterface.addColumn('file_storage', 'file_size', {
|
|
9
|
-
type: Sequelize.FLOAT,
|
|
10
|
-
allowNull: true,
|
|
11
|
-
});
|
|
12
|
-
await queryInterface.addColumn('file_storage', 'storage_user_id', {
|
|
13
|
-
type: Sequelize.UUID,
|
|
14
|
-
allowNull: true,
|
|
15
|
-
});
|
|
16
|
-
},
|
|
17
|
-
down: async (queryInterface) => {
|
|
18
|
-
await queryInterface.removeColumn('file_storage', 'institute_id');
|
|
19
|
-
await queryInterface.removeColumn('file_storage', 'file_size');
|
|
20
|
-
await queryInterface.removeColumn('file_storage', 'storage_user_id');
|
|
21
|
-
},
|
|
22
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
await queryInterface.addColumn('lectures', 'shift_id', {
|
|
5
|
-
type: Sequelize.UUID,
|
|
6
|
-
allowNull: true,
|
|
7
|
-
});
|
|
8
|
-
await queryInterface.addColumn('lectures', 'slot_id', {
|
|
9
|
-
type: Sequelize.UUID,
|
|
10
|
-
allowNull: true,
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
down: async (queryInterface) => {
|
|
14
|
-
await queryInterface.removeColumn('lectures', 'shift_id');
|
|
15
|
-
await queryInterface.removeColumn('lectures', 'slot_id');
|
|
16
|
-
},
|
|
17
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
-
const up = async (queryInterface, Sequelize) => {
|
|
4
|
-
const dataTables = [
|
|
5
|
-
{
|
|
6
|
-
tableName: 'class_rooms',
|
|
7
|
-
addFields: [
|
|
8
|
-
{
|
|
9
|
-
fieldName: 'classroomNumber',
|
|
10
|
-
type: {
|
|
11
|
-
type: Sequelize.INTEGER,
|
|
12
|
-
allowNull: true,
|
|
13
|
-
field: 'classroom_number',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
updateFields: [],
|
|
18
|
-
deleteFields: [],
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
for (const table of dataTables) {
|
|
22
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
23
|
-
for (const field of table.addFields) {
|
|
24
|
-
const columnName = field.type.field || field.fieldName;
|
|
25
|
-
if (!tableDescription[columnName]) {
|
|
26
|
-
await queryInterface.addColumn(table.tableName, columnName, field.type);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
for (const field of table.updateFields) {
|
|
30
|
-
const columnName = field.type.field || field.fieldName;
|
|
31
|
-
if (tableDescription[columnName]) {
|
|
32
|
-
await queryInterface.changeColumn(table.tableName, columnName, field.type);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
for (const field of table.deleteFields) {
|
|
36
|
-
const columnName = field.type.field || field.fieldName;
|
|
37
|
-
if (tableDescription[columnName]) {
|
|
38
|
-
await queryInterface.removeColumn(table.tableName, columnName);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const down = async (queryInterface, Sequelize) => {
|
|
44
|
-
const dataTables = [
|
|
45
|
-
{
|
|
46
|
-
tableName: 'class_rooms',
|
|
47
|
-
addFields: [
|
|
48
|
-
{
|
|
49
|
-
fieldName: 'classroomNumber',
|
|
50
|
-
type: {
|
|
51
|
-
type: Sequelize.INTEGER,
|
|
52
|
-
allowNull: true,
|
|
53
|
-
field: 'classroom_number',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
updateFields: [],
|
|
58
|
-
deleteFields: [],
|
|
59
|
-
},
|
|
60
|
-
];
|
|
61
|
-
for (const table of dataTables) {
|
|
62
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
63
|
-
for (const field of table.addFields) {
|
|
64
|
-
const columnName = field.type.field || field.fieldName;
|
|
65
|
-
if (tableDescription[columnName]) {
|
|
66
|
-
await queryInterface.removeColumn(table.tableName, columnName);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
// Add deleted fields back (if necessary)
|
|
70
|
-
for (const field of table.deleteFields) {
|
|
71
|
-
const columnName = field.type.field || field.fieldName;
|
|
72
|
-
if (!tableDescription[columnName]) {
|
|
73
|
-
await queryInterface.addColumn(table.tableName, columnName, field.type);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
module.exports = { up, down };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
await queryInterface.addColumn('floor_management', 'title', {
|
|
5
|
-
type: Sequelize.STRING,
|
|
6
|
-
allowNull: true,
|
|
7
|
-
default: null,
|
|
8
|
-
});
|
|
9
|
-
},
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
|
-
down: async (queryInterface, Sequelize) => {
|
|
12
|
-
await queryInterface.removeColumn('floor_management', 'title');
|
|
13
|
-
},
|
|
14
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
-
const up = async (queryInterface, Sequelize) => {
|
|
4
|
-
const dataTables = [
|
|
5
|
-
{
|
|
6
|
-
tableName: 'batches',
|
|
7
|
-
addFields: [
|
|
8
|
-
{
|
|
9
|
-
fieldName: 'slotId',
|
|
10
|
-
type: {
|
|
11
|
-
type: Sequelize.UUID,
|
|
12
|
-
allowNull: true,
|
|
13
|
-
field: 'slot_id',
|
|
14
|
-
ref: {
|
|
15
|
-
model: 'slots',
|
|
16
|
-
key: 'id',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
updateFields: [],
|
|
22
|
-
deleteFields: [],
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
for (const table of dataTables) {
|
|
26
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
27
|
-
for (const field of table.addFields) {
|
|
28
|
-
const columnName = field.type.field || field.fieldName;
|
|
29
|
-
if (!tableDescription[columnName]) {
|
|
30
|
-
await queryInterface.addColumn(table.tableName, columnName, field.type);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
for (const field of table.updateFields) {
|
|
34
|
-
const columnName = field.type.field || field.fieldName;
|
|
35
|
-
if (tableDescription[columnName]) {
|
|
36
|
-
await queryInterface.changeColumn(table.tableName, columnName, field.type);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
for (const field of table.deleteFields) {
|
|
40
|
-
const columnName = field.type.field || field.fieldName;
|
|
41
|
-
if (tableDescription[columnName]) {
|
|
42
|
-
await queryInterface.removeColumn(table.tableName, columnName);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const down = async (queryInterface, Sequelize) => {
|
|
48
|
-
const dataTables = [
|
|
49
|
-
{
|
|
50
|
-
tableName: 'batches',
|
|
51
|
-
addFields: [
|
|
52
|
-
{
|
|
53
|
-
fieldName: 'slotId',
|
|
54
|
-
type: {
|
|
55
|
-
type: Sequelize.UUID,
|
|
56
|
-
allowNull: true,
|
|
57
|
-
field: 'slot_id',
|
|
58
|
-
ref: {
|
|
59
|
-
model: 'slots',
|
|
60
|
-
key: 'id',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
updateFields: [],
|
|
66
|
-
deleteFields: [],
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
for (const table of dataTables) {
|
|
70
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
71
|
-
for (const field of table.addFields) {
|
|
72
|
-
const columnName = field.type.field || field.fieldName;
|
|
73
|
-
if (tableDescription[columnName]) {
|
|
74
|
-
await queryInterface.removeColumn(table.tableName, columnName);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Add deleted fields back (if necessary)
|
|
78
|
-
for (const field of table.deleteFields) {
|
|
79
|
-
const columnName = field.type.field || field.fieldName;
|
|
80
|
-
if (!tableDescription[columnName]) {
|
|
81
|
-
await queryInterface.addColumn(table.tableName, columnName, field.type);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
module.exports = { up, down };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const up = async (queryInterface, Sequelize) => {
|
|
3
|
-
await queryInterface.changeColumn('class_rooms', 'title', {
|
|
4
|
-
type: Sequelize.STRING,
|
|
5
|
-
allowNull: true,
|
|
6
|
-
});
|
|
7
|
-
await queryInterface.changeColumn('class_rooms', 'classroom_number', {
|
|
8
|
-
type: Sequelize.STRING,
|
|
9
|
-
allowNull: true,
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
const down = async () => {
|
|
13
|
-
//
|
|
14
|
-
};
|
|
15
|
-
module.exports = { up, down };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
'use strict';
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface) => {
|
|
5
|
-
// Check if index already exists
|
|
6
|
-
const [results] = await queryInterface.sequelize.query(`
|
|
7
|
-
SELECT indexname
|
|
8
|
-
FROM pg_indexes
|
|
9
|
-
WHERE tablename = 'slots' AND indexname = 'institute_id_name';
|
|
10
|
-
`);
|
|
11
|
-
if (results.length === 0) {
|
|
12
|
-
await queryInterface.addIndex('slots', ['institute_id', 'name', 'type'], {
|
|
13
|
-
name: 'institute_id_name',
|
|
14
|
-
unique: true,
|
|
15
|
-
where: {
|
|
16
|
-
deleted_at: null,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
down: async (queryInterface) => {
|
|
22
|
-
await queryInterface.removeIndex('slots', 'institute_id_name');
|
|
23
|
-
},
|
|
24
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
'use strict';
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface) => {
|
|
5
|
-
// Remove the old unique index
|
|
6
|
-
await queryInterface.removeIndex('batch_subject_book_assessments', 'batch_subject_standard_institute');
|
|
7
|
-
// Add the new unique index with `assessment_type`
|
|
8
|
-
await queryInterface.addIndex('batch_subject_book_assessments', {
|
|
9
|
-
name: 'batch_subject_standard_institute_assessment_type',
|
|
10
|
-
unique: true,
|
|
11
|
-
fields: ['batch_id', 'subject_id', 'standard_id', 'institute_id', 'assessment_type'],
|
|
12
|
-
where: {
|
|
13
|
-
deleted_at: null,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
},
|
|
17
|
-
down: async (queryInterface) => {
|
|
18
|
-
// Remove the updated unique index
|
|
19
|
-
await queryInterface.removeIndex('batch_subject_book_assessments', 'batch_subject_standard_institute_assessment_type');
|
|
20
|
-
// Recreate the old unique index
|
|
21
|
-
await queryInterface.addIndex('batch_subject_book_assessments', {
|
|
22
|
-
name: 'batch_subject_standard_institute',
|
|
23
|
-
unique: true,
|
|
24
|
-
fields: ['batch_id', 'subject_id', 'standard_id', 'institute_id'],
|
|
25
|
-
where: {
|
|
26
|
-
deleted_at: null,
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
-
const up = async (queryInterface) => {
|
|
4
|
-
const dataTables = [
|
|
5
|
-
{
|
|
6
|
-
tableName: 'institutes',
|
|
7
|
-
changeFields: [
|
|
8
|
-
{
|
|
9
|
-
fieldName: 'pdfId',
|
|
10
|
-
columnName: 'pdf_id',
|
|
11
|
-
newType: 'UUID',
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
];
|
|
16
|
-
for (const table of dataTables) {
|
|
17
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
18
|
-
for (const field of table.changeFields) {
|
|
19
|
-
const { columnName, newType } = field;
|
|
20
|
-
if (tableDescription[columnName]) {
|
|
21
|
-
// Step 1: Drop the default value (important!)
|
|
22
|
-
await queryInterface.sequelize.query(`
|
|
23
|
-
ALTER TABLE "${table.tableName}"
|
|
24
|
-
ALTER COLUMN "${columnName}" DROP DEFAULT;
|
|
25
|
-
`);
|
|
26
|
-
// Step 2: Alter the type to UUID
|
|
27
|
-
await queryInterface.sequelize.query(`
|
|
28
|
-
ALTER TABLE "${table.tableName}"
|
|
29
|
-
ALTER COLUMN "${columnName}" TYPE ${newType} USING "${columnName}"::${newType};
|
|
30
|
-
`);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const down = async (queryInterface, Sequelize) => {
|
|
36
|
-
const dataTables = [
|
|
37
|
-
{
|
|
38
|
-
tableName: 'institutes',
|
|
39
|
-
changeFields: [
|
|
40
|
-
{
|
|
41
|
-
fieldName: 'pdfId',
|
|
42
|
-
columnName: 'pdf_id',
|
|
43
|
-
revertType: Sequelize.STRING,
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
];
|
|
48
|
-
for (const table of dataTables) {
|
|
49
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
50
|
-
for (const field of table.changeFields) {
|
|
51
|
-
const { columnName, revertType } = field;
|
|
52
|
-
if (tableDescription[columnName]) {
|
|
53
|
-
await queryInterface.changeColumn(table.tableName, columnName, {
|
|
54
|
-
type: revertType,
|
|
55
|
-
allowNull: true,
|
|
56
|
-
defaultValue: null,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
module.exports = { up, down };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
-
module.exports = {
|
|
4
|
-
async up(queryInterface) {
|
|
5
|
-
// Remove the index
|
|
6
|
-
await queryInterface.removeIndex('batch_subject_project_assessments', // Replace with your actual table name
|
|
7
|
-
'batch_subject_project_assessments_unique');
|
|
8
|
-
},
|
|
9
|
-
async down(queryInterface) {
|
|
10
|
-
// Recreate the index in case of rollback
|
|
11
|
-
await queryInterface.addIndex('batch_subject_project_assessments', {
|
|
12
|
-
name: 'batch_subject_project_assessments_unique',
|
|
13
|
-
unique: true,
|
|
14
|
-
fields: ['batch_id', 'subject_id', 'standard_id', 'institute_id'],
|
|
15
|
-
where: {
|
|
16
|
-
// eslint-disable-next-line camelcase
|
|
17
|
-
deleted_at: null, // Assuming you're using snake_case in DB
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
await queryInterface.addColumn('lectures', 'descriptions', {
|
|
5
|
-
type: Sequelize.STRING,
|
|
6
|
-
allowNull: true,
|
|
7
|
-
});
|
|
8
|
-
},
|
|
9
|
-
down: async (queryInterface) => {
|
|
10
|
-
await queryInterface.removeColumn('lectures', 'descriptions');
|
|
11
|
-
},
|
|
12
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
/** @type {import('sequelize-cli').Migration} */
|
|
3
|
-
const up = async (queryInterface, Sequelize) => {
|
|
4
|
-
const dataTables = [
|
|
5
|
-
{
|
|
6
|
-
tableName: 'contact_feed_back',
|
|
7
|
-
addFields: [
|
|
8
|
-
{
|
|
9
|
-
fieldName: 'givenInstitutedId',
|
|
10
|
-
type: {
|
|
11
|
-
type: Sequelize.UUID,
|
|
12
|
-
allowNull: true,
|
|
13
|
-
field: 'given_instituted_id',
|
|
14
|
-
ref: {
|
|
15
|
-
model: 'institutes',
|
|
16
|
-
key: 'id',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
updateFields: [],
|
|
22
|
-
deleteFields: [],
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
for (const table of dataTables) {
|
|
26
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
27
|
-
for (const field of table.addFields) {
|
|
28
|
-
const columnName = field.type.field || field.fieldName;
|
|
29
|
-
if (!tableDescription[columnName]) {
|
|
30
|
-
await queryInterface.addColumn(table.tableName, columnName, field.type);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
for (const field of table.updateFields) {
|
|
34
|
-
const columnName = field.type.field || field.fieldName;
|
|
35
|
-
if (tableDescription[columnName]) {
|
|
36
|
-
await queryInterface.changeColumn(table.tableName, columnName, field.type);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
for (const field of table.deleteFields) {
|
|
40
|
-
const columnName = field.type.field || field.fieldName;
|
|
41
|
-
if (tableDescription[columnName]) {
|
|
42
|
-
await queryInterface.removeColumn(table.tableName, columnName);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const down = async (queryInterface, Sequelize) => {
|
|
48
|
-
const dataTables = [
|
|
49
|
-
{
|
|
50
|
-
tableName: 'contact_feed_back',
|
|
51
|
-
addFields: [
|
|
52
|
-
{
|
|
53
|
-
fieldName: 'givenInstitutedId',
|
|
54
|
-
type: {
|
|
55
|
-
type: Sequelize.UUID,
|
|
56
|
-
allowNull: true,
|
|
57
|
-
field: 'given_instituted_id',
|
|
58
|
-
ref: {
|
|
59
|
-
model: 'institutes',
|
|
60
|
-
key: 'id',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
updateFields: [],
|
|
66
|
-
deleteFields: [],
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
for (const table of dataTables) {
|
|
70
|
-
const tableDescription = await queryInterface.describeTable(table.tableName);
|
|
71
|
-
for (const field of table.addFields) {
|
|
72
|
-
const columnName = field.type.field || field.fieldName;
|
|
73
|
-
if (tableDescription[columnName]) {
|
|
74
|
-
await queryInterface.removeColumn(table.tableName, columnName);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Add deleted fields back (if necessary)
|
|
78
|
-
for (const field of table.deleteFields) {
|
|
79
|
-
const columnName = field.type.field || field.fieldName;
|
|
80
|
-
if (!tableDescription[columnName]) {
|
|
81
|
-
await queryInterface.addColumn(table.tableName, columnName, field.type);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
module.exports = { up, down };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
async up(queryInterface, Sequelize) {
|
|
4
|
-
await queryInterface.addColumn('institute_entities', 'sequence_number', {
|
|
5
|
-
type: Sequelize.INTEGER,
|
|
6
|
-
allowNull: true,
|
|
7
|
-
});
|
|
8
|
-
},
|
|
9
|
-
async down(queryInterface) {
|
|
10
|
-
await queryInterface.removeColumn('institute_entities', 'sequence_number');
|
|
11
|
-
},
|
|
12
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
async up(queryInterface, Sequelize) {
|
|
4
|
-
await queryInterface.addColumn('batch_subject_project_assessments', 'title', {
|
|
5
|
-
type: Sequelize.STRING,
|
|
6
|
-
allowNull: true,
|
|
7
|
-
});
|
|
8
|
-
await queryInterface.addColumn('batch_subject_project_assessments', 'descriptions', {
|
|
9
|
-
type: Sequelize.TEXT,
|
|
10
|
-
allowNull: true,
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
async down(queryInterface) {
|
|
14
|
-
await queryInterface.removeColumn('batch_subject_project_assessments', 'title');
|
|
15
|
-
await queryInterface.removeColumn('batch_subject_project_assessments', 'descriptions');
|
|
16
|
-
},
|
|
17
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
module.exports = {
|
|
3
|
-
up: async (queryInterface, Sequelize) => {
|
|
4
|
-
const tableInfo = await queryInterface.describeTable('institute_entities');
|
|
5
|
-
if (!tableInfo.sequence_number) {
|
|
6
|
-
await queryInterface.addColumn('institute_entities', 'sequence_number', {
|
|
7
|
-
type: Sequelize.INTEGER,
|
|
8
|
-
allowNull: true,
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
down: async (queryInterface) => {
|
|
13
|
-
await queryInterface.removeColumn('institute_entities', 'sequence_number');
|
|
14
|
-
},
|
|
15
|
-
};
|