@procxo/shared 1.0.1
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/README.md +250 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +7 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/ormconfig.factory.d.ts +10 -0
- package/dist/config/ormconfig.factory.d.ts.map +1 -0
- package/dist/config/ormconfig.factory.js +47 -0
- package/dist/config/ormconfig.factory.js.map +1 -0
- package/dist/config/typeorm.config.d.ts +4 -0
- package/dist/config/typeorm.config.d.ts.map +1 -0
- package/dist/config/typeorm.config.js +22 -0
- package/dist/config/typeorm.config.js.map +1 -0
- package/dist/core/constant/index.d.ts +2 -0
- package/dist/core/constant/index.d.ts.map +1 -0
- package/dist/core/constant/index.js +18 -0
- package/dist/core/constant/index.js.map +1 -0
- package/dist/core/constant/notification-preference.d.ts +29 -0
- package/dist/core/constant/notification-preference.d.ts.map +1 -0
- package/dist/core/constant/notification-preference.js +81 -0
- package/dist/core/constant/notification-preference.js.map +1 -0
- package/dist/core/json/core-data/currency.json +8 -0
- package/dist/core/json/core-data/department.json +38 -0
- package/dist/core/json/core-data/permission.json +898 -0
- package/dist/core/json/core-data/role.json +30 -0
- package/dist/core/json/core-data/user.json +12 -0
- package/dist/core/json/geographic-data/cities.json +54693 -0
- package/dist/core/json/geographic-data/countries.json +31 -0
- package/dist/database/entities/activity-logs.entity.d.ts +11 -0
- package/dist/database/entities/activity-logs.entity.d.ts.map +1 -0
- package/dist/database/entities/activity-logs.entity.js +56 -0
- package/dist/database/entities/activity-logs.entity.js.map +1 -0
- package/dist/database/entities/address.entity.d.ts +13 -0
- package/dist/database/entities/address.entity.d.ts.map +1 -0
- package/dist/database/entities/address.entity.js +63 -0
- package/dist/database/entities/address.entity.js.map +1 -0
- package/dist/database/entities/alert.entity.d.ts +37 -0
- package/dist/database/entities/alert.entity.d.ts.map +1 -0
- package/dist/database/entities/alert.entity.js +171 -0
- package/dist/database/entities/alert.entity.js.map +1 -0
- package/dist/database/entities/approval-condition.entity.d.ts +16 -0
- package/dist/database/entities/approval-condition.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-condition.entity.js +66 -0
- package/dist/database/entities/approval-condition.entity.js.map +1 -0
- package/dist/database/entities/approval-hierarchy-role.entity.d.ts +10 -0
- package/dist/database/entities/approval-hierarchy-role.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-hierarchy-role.entity.js +47 -0
- package/dist/database/entities/approval-hierarchy-role.entity.js.map +1 -0
- package/dist/database/entities/approval-hierarchy-user.entity.d.ts +10 -0
- package/dist/database/entities/approval-hierarchy-user.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-hierarchy-user.entity.js +47 -0
- package/dist/database/entities/approval-hierarchy-user.entity.js.map +1 -0
- package/dist/database/entities/approval-hierarchy.entity.d.ts +22 -0
- package/dist/database/entities/approval-hierarchy.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-hierarchy.entity.js +80 -0
- package/dist/database/entities/approval-hierarchy.entity.js.map +1 -0
- package/dist/database/entities/approval-journey.entity.d.ts +32 -0
- package/dist/database/entities/approval-journey.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-journey.entity.js +125 -0
- package/dist/database/entities/approval-journey.entity.js.map +1 -0
- package/dist/database/entities/approval-level-escalation-user.entity.d.ts +10 -0
- package/dist/database/entities/approval-level-escalation-user.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-level-escalation-user.entity.js +47 -0
- package/dist/database/entities/approval-level-escalation-user.entity.js.map +1 -0
- package/dist/database/entities/approval-level-escalation.entity.d.ts +14 -0
- package/dist/database/entities/approval-level-escalation.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-level-escalation.entity.js +65 -0
- package/dist/database/entities/approval-level-escalation.entity.js.map +1 -0
- package/dist/database/entities/approval-level-user.entity.d.ts +10 -0
- package/dist/database/entities/approval-level-user.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-level-user.entity.js +49 -0
- package/dist/database/entities/approval-level-user.entity.js.map +1 -0
- package/dist/database/entities/approval-level.entity.d.ts +17 -0
- package/dist/database/entities/approval-level.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-level.entity.js +76 -0
- package/dist/database/entities/approval-level.entity.js.map +1 -0
- package/dist/database/entities/base.entity.d.ts +12 -0
- package/dist/database/entities/base.entity.d.ts.map +1 -0
- package/dist/database/entities/base.entity.js +63 -0
- package/dist/database/entities/base.entity.js.map +1 -0
- package/dist/database/entities/chat.entity.d.ts +13 -0
- package/dist/database/entities/chat.entity.d.ts.map +1 -0
- package/dist/database/entities/chat.entity.js +67 -0
- package/dist/database/entities/chat.entity.js.map +1 -0
- package/dist/database/entities/city.entity.d.ts +11 -0
- package/dist/database/entities/city.entity.d.ts.map +1 -0
- package/dist/database/entities/city.entity.js +53 -0
- package/dist/database/entities/city.entity.js.map +1 -0
- package/dist/database/entities/client.entity.d.ts +40 -0
- package/dist/database/entities/client.entity.d.ts.map +1 -0
- package/dist/database/entities/client.entity.js +146 -0
- package/dist/database/entities/client.entity.js.map +1 -0
- package/dist/database/entities/contact.entity.d.ts +12 -0
- package/dist/database/entities/contact.entity.d.ts.map +1 -0
- package/dist/database/entities/contact.entity.js +57 -0
- package/dist/database/entities/contact.entity.js.map +1 -0
- package/dist/database/entities/country.entity.d.ts +26 -0
- package/dist/database/entities/country.entity.d.ts.map +1 -0
- package/dist/database/entities/country.entity.js +127 -0
- package/dist/database/entities/country.entity.js.map +1 -0
- package/dist/database/entities/credit-note.entity.d.ts +35 -0
- package/dist/database/entities/credit-note.entity.d.ts.map +1 -0
- package/dist/database/entities/credit-note.entity.js +144 -0
- package/dist/database/entities/credit-note.entity.js.map +1 -0
- package/dist/database/entities/currency.entity.d.ts +10 -0
- package/dist/database/entities/currency.entity.d.ts.map +1 -0
- package/dist/database/entities/currency.entity.js +47 -0
- package/dist/database/entities/currency.entity.js.map +1 -0
- package/dist/database/entities/department.entity.d.ts +10 -0
- package/dist/database/entities/department.entity.d.ts.map +1 -0
- package/dist/database/entities/department.entity.js +47 -0
- package/dist/database/entities/department.entity.js.map +1 -0
- package/dist/database/entities/entitlement.entity.d.ts +24 -0
- package/dist/database/entities/entitlement.entity.d.ts.map +1 -0
- package/dist/database/entities/entitlement.entity.js +106 -0
- package/dist/database/entities/entitlement.entity.js.map +1 -0
- package/dist/database/entities/expense.entity.d.ts +47 -0
- package/dist/database/entities/expense.entity.d.ts.map +1 -0
- package/dist/database/entities/expense.entity.js +221 -0
- package/dist/database/entities/expense.entity.js.map +1 -0
- package/dist/database/entities/file.entity.d.ts +9 -0
- package/dist/database/entities/file.entity.d.ts.map +1 -0
- package/dist/database/entities/file.entity.js +46 -0
- package/dist/database/entities/file.entity.js.map +1 -0
- package/dist/database/entities/fixed-invoice-item.entity.d.ts +9 -0
- package/dist/database/entities/fixed-invoice-item.entity.d.ts.map +1 -0
- package/dist/database/entities/fixed-invoice-item.entity.js +52 -0
- package/dist/database/entities/fixed-invoice-item.entity.js.map +1 -0
- package/dist/database/entities/group.entity.d.ts +9 -0
- package/dist/database/entities/group.entity.d.ts.map +1 -0
- package/dist/database/entities/group.entity.js +45 -0
- package/dist/database/entities/group.entity.js.map +1 -0
- package/dist/database/entities/gst.entity.d.ts +6 -0
- package/dist/database/entities/gst.entity.d.ts.map +1 -0
- package/dist/database/entities/gst.entity.js +44 -0
- package/dist/database/entities/gst.entity.js.map +1 -0
- package/dist/database/entities/holiday.entity.d.ts +14 -0
- package/dist/database/entities/holiday.entity.d.ts.map +1 -0
- package/dist/database/entities/holiday.entity.js +79 -0
- package/dist/database/entities/holiday.entity.js.map +1 -0
- package/dist/database/entities/index.d.ts +78 -0
- package/dist/database/entities/index.d.ts.map +1 -0
- package/dist/database/entities/index.js +94 -0
- package/dist/database/entities/index.js.map +1 -0
- package/dist/database/entities/invoice-template-footer.entity.d.ts +24 -0
- package/dist/database/entities/invoice-template-footer.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice-template-footer.entity.js +118 -0
- package/dist/database/entities/invoice-template-footer.entity.js.map +1 -0
- package/dist/database/entities/invoice-template-header.entity.d.ts +14 -0
- package/dist/database/entities/invoice-template-header.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice-template-header.entity.js +68 -0
- package/dist/database/entities/invoice-template-header.entity.js.map +1 -0
- package/dist/database/entities/invoice-template-table.entity.d.ts +35 -0
- package/dist/database/entities/invoice-template-table.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice-template-table.entity.js +143 -0
- package/dist/database/entities/invoice-template-table.entity.js.map +1 -0
- package/dist/database/entities/invoice-template.entity.d.ts +39 -0
- package/dist/database/entities/invoice-template.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice-template.entity.js +157 -0
- package/dist/database/entities/invoice-template.entity.js.map +1 -0
- package/dist/database/entities/invoice.entity.d.ts +46 -0
- package/dist/database/entities/invoice.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice.entity.js +212 -0
- package/dist/database/entities/invoice.entity.js.map +1 -0
- package/dist/database/entities/invoice_item.entity.d.ts +22 -0
- package/dist/database/entities/invoice_item.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice_item.entity.js +89 -0
- package/dist/database/entities/invoice_item.entity.js.map +1 -0
- package/dist/database/entities/leave-balance.entity.d.ts +38 -0
- package/dist/database/entities/leave-balance.entity.d.ts.map +1 -0
- package/dist/database/entities/leave-balance.entity.js +166 -0
- package/dist/database/entities/leave-balance.entity.js.map +1 -0
- package/dist/database/entities/leave-request.entity.d.ts +64 -0
- package/dist/database/entities/leave-request.entity.d.ts.map +1 -0
- package/dist/database/entities/leave-request.entity.js +219 -0
- package/dist/database/entities/leave-request.entity.js.map +1 -0
- package/dist/database/entities/leave-type.entity.d.ts +15 -0
- package/dist/database/entities/leave-type.entity.d.ts.map +1 -0
- package/dist/database/entities/leave-type.entity.js +72 -0
- package/dist/database/entities/leave-type.entity.js.map +1 -0
- package/dist/database/entities/matter-tag.entity.d.ts +10 -0
- package/dist/database/entities/matter-tag.entity.d.ts.map +1 -0
- package/dist/database/entities/matter-tag.entity.js +45 -0
- package/dist/database/entities/matter-tag.entity.js.map +1 -0
- package/dist/database/entities/matter-task-view-filter.entity.d.ts +11 -0
- package/dist/database/entities/matter-task-view-filter.entity.d.ts.map +1 -0
- package/dist/database/entities/matter-task-view-filter.entity.js +42 -0
- package/dist/database/entities/matter-task-view-filter.entity.js.map +1 -0
- package/dist/database/entities/matter-team-member.entity.d.ts +11 -0
- package/dist/database/entities/matter-team-member.entity.d.ts.map +1 -0
- package/dist/database/entities/matter-team-member.entity.js +56 -0
- package/dist/database/entities/matter-team-member.entity.js.map +1 -0
- package/dist/database/entities/matter.entity.d.ts +62 -0
- package/dist/database/entities/matter.entity.d.ts.map +1 -0
- package/dist/database/entities/matter.entity.js +249 -0
- package/dist/database/entities/matter.entity.js.map +1 -0
- package/dist/database/entities/payment.entity.d.ts +26 -0
- package/dist/database/entities/payment.entity.d.ts.map +1 -0
- package/dist/database/entities/payment.entity.js +127 -0
- package/dist/database/entities/payment.entity.js.map +1 -0
- package/dist/database/entities/permission.entity.d.ts +11 -0
- package/dist/database/entities/permission.entity.d.ts.map +1 -0
- package/dist/database/entities/permission.entity.js +52 -0
- package/dist/database/entities/permission.entity.js.map +1 -0
- package/dist/database/entities/quickbooks-connection.entity.d.ts +14 -0
- package/dist/database/entities/quickbooks-connection.entity.d.ts.map +1 -0
- package/dist/database/entities/quickbooks-connection.entity.js +71 -0
- package/dist/database/entities/quickbooks-connection.entity.js.map +1 -0
- package/dist/database/entities/quickbooks-sync-log.entity.d.ts +34 -0
- package/dist/database/entities/quickbooks-sync-log.entity.d.ts.map +1 -0
- package/dist/database/entities/quickbooks-sync-log.entity.js +116 -0
- package/dist/database/entities/quickbooks-sync-log.entity.js.map +1 -0
- package/dist/database/entities/role-permission.entity.d.ts +10 -0
- package/dist/database/entities/role-permission.entity.d.ts.map +1 -0
- package/dist/database/entities/role-permission.entity.js +49 -0
- package/dist/database/entities/role-permission.entity.js.map +1 -0
- package/dist/database/entities/role-shift.entity.d.ts +8 -0
- package/dist/database/entities/role-shift.entity.d.ts.map +1 -0
- package/dist/database/entities/role-shift.entity.js +48 -0
- package/dist/database/entities/role-shift.entity.js.map +1 -0
- package/dist/database/entities/role.entity.d.ts +13 -0
- package/dist/database/entities/role.entity.d.ts.map +1 -0
- package/dist/database/entities/role.entity.js +58 -0
- package/dist/database/entities/role.entity.js.map +1 -0
- package/dist/database/entities/sequence-generator.entity.d.ts +8 -0
- package/dist/database/entities/sequence-generator.entity.d.ts.map +1 -0
- package/dist/database/entities/sequence-generator.entity.js +64 -0
- package/dist/database/entities/sequence-generator.entity.js.map +1 -0
- package/dist/database/entities/shift.entity.d.ts +18 -0
- package/dist/database/entities/shift.entity.d.ts.map +1 -0
- package/dist/database/entities/shift.entity.js +110 -0
- package/dist/database/entities/shift.entity.js.map +1 -0
- package/dist/database/entities/sub-task-tag.entity.d.ts +10 -0
- package/dist/database/entities/sub-task-tag.entity.d.ts.map +1 -0
- package/dist/database/entities/sub-task-tag.entity.js +45 -0
- package/dist/database/entities/sub-task-tag.entity.js.map +1 -0
- package/dist/database/entities/subtask-user.entity.d.ts +10 -0
- package/dist/database/entities/subtask-user.entity.d.ts.map +1 -0
- package/dist/database/entities/subtask-user.entity.js +45 -0
- package/dist/database/entities/subtask-user.entity.js.map +1 -0
- package/dist/database/entities/subtask.entity.d.ts +47 -0
- package/dist/database/entities/subtask.entity.d.ts.map +1 -0
- package/dist/database/entities/subtask.entity.js +185 -0
- package/dist/database/entities/subtask.entity.js.map +1 -0
- package/dist/database/entities/summary-task-status.entity.d.ts +7 -0
- package/dist/database/entities/summary-task-status.entity.d.ts.map +1 -0
- package/dist/database/entities/summary-task-status.entity.js +37 -0
- package/dist/database/entities/summary-task-status.entity.js.map +1 -0
- package/dist/database/entities/superset.entity.d.ts +15 -0
- package/dist/database/entities/superset.entity.d.ts.map +1 -0
- package/dist/database/entities/superset.entity.js +73 -0
- package/dist/database/entities/superset.entity.js.map +1 -0
- package/dist/database/entities/tag.entity.d.ts +10 -0
- package/dist/database/entities/tag.entity.d.ts.map +1 -0
- package/dist/database/entities/tag.entity.js +43 -0
- package/dist/database/entities/tag.entity.js.map +1 -0
- package/dist/database/entities/task-comment.entity.d.ts +15 -0
- package/dist/database/entities/task-comment.entity.d.ts.map +1 -0
- package/dist/database/entities/task-comment.entity.js +67 -0
- package/dist/database/entities/task-comment.entity.js.map +1 -0
- package/dist/database/entities/task-milestone.entity.d.ts +7 -0
- package/dist/database/entities/task-milestone.entity.d.ts.map +1 -0
- package/dist/database/entities/task-milestone.entity.js +36 -0
- package/dist/database/entities/task-milestone.entity.js.map +1 -0
- package/dist/database/entities/task-remainder.entity.d.ts +12 -0
- package/dist/database/entities/task-remainder.entity.d.ts.map +1 -0
- package/dist/database/entities/task-remainder.entity.js +57 -0
- package/dist/database/entities/task-remainder.entity.js.map +1 -0
- package/dist/database/entities/task-tag.entity.d.ts +10 -0
- package/dist/database/entities/task-tag.entity.d.ts.map +1 -0
- package/dist/database/entities/task-tag.entity.js +45 -0
- package/dist/database/entities/task-tag.entity.js.map +1 -0
- package/dist/database/entities/task-type.entity.d.ts +7 -0
- package/dist/database/entities/task-type.entity.d.ts.map +1 -0
- package/dist/database/entities/task-type.entity.js +36 -0
- package/dist/database/entities/task-type.entity.js.map +1 -0
- package/dist/database/entities/task-user.entity.d.ts +10 -0
- package/dist/database/entities/task-user.entity.d.ts.map +1 -0
- package/dist/database/entities/task-user.entity.js +45 -0
- package/dist/database/entities/task-user.entity.js.map +1 -0
- package/dist/database/entities/task.entity.d.ts +53 -0
- package/dist/database/entities/task.entity.d.ts.map +1 -0
- package/dist/database/entities/task.entity.js +259 -0
- package/dist/database/entities/task.entity.js.map +1 -0
- package/dist/database/entities/template-task.entity.d.ts +11 -0
- package/dist/database/entities/template-task.entity.d.ts.map +1 -0
- package/dist/database/entities/template-task.entity.js +53 -0
- package/dist/database/entities/template-task.entity.js.map +1 -0
- package/dist/database/entities/template.entity.d.ts +13 -0
- package/dist/database/entities/template.entity.d.ts.map +1 -0
- package/dist/database/entities/template.entity.js +58 -0
- package/dist/database/entities/template.entity.js.map +1 -0
- package/dist/database/entities/timesheet-comment.entity.d.ts +11 -0
- package/dist/database/entities/timesheet-comment.entity.d.ts.map +1 -0
- package/dist/database/entities/timesheet-comment.entity.js +65 -0
- package/dist/database/entities/timesheet-comment.entity.js.map +1 -0
- package/dist/database/entities/timesheet-event.entity.d.ts +48 -0
- package/dist/database/entities/timesheet-event.entity.d.ts.map +1 -0
- package/dist/database/entities/timesheet-event.entity.js +328 -0
- package/dist/database/entities/timesheet-event.entity.js.map +1 -0
- package/dist/database/entities/timesheet-summary.entity.d.ts +27 -0
- package/dist/database/entities/timesheet-summary.entity.d.ts.map +1 -0
- package/dist/database/entities/timesheet-summary.entity.js +161 -0
- package/dist/database/entities/timesheet-summary.entity.js.map +1 -0
- package/dist/database/entities/timesheet.entity.d.ts +32 -0
- package/dist/database/entities/timesheet.entity.d.ts.map +1 -0
- package/dist/database/entities/timesheet.entity.js +112 -0
- package/dist/database/entities/timesheet.entity.js.map +1 -0
- package/dist/database/entities/transfer-ownership.entity.d.ts +15 -0
- package/dist/database/entities/transfer-ownership.entity.d.ts.map +1 -0
- package/dist/database/entities/transfer-ownership.entity.js +75 -0
- package/dist/database/entities/transfer-ownership.entity.js.map +1 -0
- package/dist/database/entities/upload-log.entity.d.ts +31 -0
- package/dist/database/entities/upload-log.entity.d.ts.map +1 -0
- package/dist/database/entities/upload-log.entity.js +111 -0
- package/dist/database/entities/upload-log.entity.js.map +1 -0
- package/dist/database/entities/user-notification-channel.entity.d.ts +8 -0
- package/dist/database/entities/user-notification-channel.entity.d.ts.map +1 -0
- package/dist/database/entities/user-notification-channel.entity.js +63 -0
- package/dist/database/entities/user-notification-channel.entity.js.map +1 -0
- package/dist/database/entities/user-notification-preference.entity.d.ts +10 -0
- package/dist/database/entities/user-notification-preference.entity.d.ts.map +1 -0
- package/dist/database/entities/user-notification-preference.entity.js +72 -0
- package/dist/database/entities/user-notification-preference.entity.js.map +1 -0
- package/dist/database/entities/user-role.entity.d.ts +10 -0
- package/dist/database/entities/user-role.entity.d.ts.map +1 -0
- package/dist/database/entities/user-role.entity.js +45 -0
- package/dist/database/entities/user-role.entity.js.map +1 -0
- package/dist/database/entities/user-session-history.entity.d.ts +16 -0
- package/dist/database/entities/user-session-history.entity.d.ts.map +1 -0
- package/dist/database/entities/user-session-history.entity.js +78 -0
- package/dist/database/entities/user-session-history.entity.js.map +1 -0
- package/dist/database/entities/user-shift.entity.d.ts +24 -0
- package/dist/database/entities/user-shift.entity.d.ts.map +1 -0
- package/dist/database/entities/user-shift.entity.js +153 -0
- package/dist/database/entities/user-shift.entity.js.map +1 -0
- package/dist/database/entities/user.entity.d.ts +74 -0
- package/dist/database/entities/user.entity.d.ts.map +1 -0
- package/dist/database/entities/user.entity.js +280 -0
- package/dist/database/entities/user.entity.js.map +1 -0
- package/dist/database/index.d.ts +2 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +18 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/migrations/1770706648232-initialMigration.d.ts +7 -0
- package/dist/database/migrations/1770706648232-initialMigration.d.ts.map +1 -0
- package/dist/database/migrations/1770706648232-initialMigration.js +474 -0
- package/dist/database/migrations/1770706648232-initialMigration.js.map +1 -0
- package/dist/database/seeder/base.seed.d.ts +19 -0
- package/dist/database/seeder/base.seed.d.ts.map +1 -0
- package/dist/database/seeder/base.seed.js +83 -0
- package/dist/database/seeder/base.seed.js.map +1 -0
- package/dist/database/seeder/config/seeder.config.d.ts +7 -0
- package/dist/database/seeder/config/seeder.config.d.ts.map +1 -0
- package/dist/database/seeder/config/seeder.config.js +21 -0
- package/dist/database/seeder/config/seeder.config.js.map +1 -0
- package/dist/database/seeder/errors/seeder.error.d.ts +11 -0
- package/dist/database/seeder/errors/seeder.error.d.ts.map +1 -0
- package/dist/database/seeder/errors/seeder.error.js +27 -0
- package/dist/database/seeder/errors/seeder.error.js.map +1 -0
- package/dist/database/seeder/seed-runner.d.ts +2 -0
- package/dist/database/seeder/seed-runner.d.ts.map +1 -0
- package/dist/database/seeder/seed-runner.js +157 -0
- package/dist/database/seeder/seed-runner.js.map +1 -0
- package/dist/database/seeder/seeds/city.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/city.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/city.seed.js +62 -0
- package/dist/database/seeder/seeds/city.seed.js.map +1 -0
- package/dist/database/seeder/seeds/country.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/country.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/country.seed.js +54 -0
- package/dist/database/seeder/seeds/country.seed.js.map +1 -0
- package/dist/database/seeder/seeds/currency.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/currency.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/currency.seed.js +50 -0
- package/dist/database/seeder/seeds/currency.seed.js.map +1 -0
- package/dist/database/seeder/seeds/department.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/department.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/department.seed.js +48 -0
- package/dist/database/seeder/seeds/department.seed.js.map +1 -0
- package/dist/database/seeder/seeds/permission.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/permission.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/permission.seed.js +54 -0
- package/dist/database/seeder/seeds/permission.seed.js.map +1 -0
- package/dist/database/seeder/seeds/role-permission.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/role-permission.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/role-permission.seed.js +47 -0
- package/dist/database/seeder/seeds/role-permission.seed.js.map +1 -0
- package/dist/database/seeder/seeds/role.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/role.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/role.seed.js +52 -0
- package/dist/database/seeder/seeds/role.seed.js.map +1 -0
- package/dist/database/seeder/seeds/user-role.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/user-role.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/user-role.seed.js +66 -0
- package/dist/database/seeder/seeds/user-role.seed.js.map +1 -0
- package/dist/database/seeder/seeds/user.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/user.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/user.seed.js +110 -0
- package/dist/database/seeder/seeds/user.seed.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/scripts/create-schema.d.ts +2 -0
- package/dist/scripts/create-schema.d.ts.map +1 -0
- package/dist/scripts/create-schema.js +77 -0
- package/dist/scripts/create-schema.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InitialMigration1770706648232 = void 0;
|
|
4
|
+
class InitialMigration1770706648232 {
|
|
5
|
+
name = 'InitialMigration1770706648232';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "core"."activity_logs" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer, "resource_type" character varying, "resource_id" integer, "action" character varying, "description" character varying, "before_data" json, "after_data" json, CONSTRAINT "PK_f25287b6140c5ba18d38776a796" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE "core"."contacts" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "clientId" integer NOT NULL, "contactName" character varying(100) NOT NULL, "contactType" character varying(10) NOT NULL DEFAULT 'Primary', "contactEmail" character varying(150), "countryCode" character varying(10), "contactPhone" character varying(15), CONSTRAINT "PK_b99cd40cfd66a99f1571f4f72e6" PRIMARY KEY ("id"))`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "core"."groups" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "group_name" character varying(255) NOT NULL, "is_active" boolean DEFAULT true, "prefix_group" jsonb, CONSTRAINT "UQ_ef10d4611e4f355d10ecaa10ac6" UNIQUE ("group_name"), CONSTRAINT "PK_659d1483316afb28afd3a90646e" PRIMARY KEY ("id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE TABLE "core"."matters_tags" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "matterId" integer NOT NULL, "tagId" integer NOT NULL, CONSTRAINT "PK_8522541777754e805ee41e13af0" PRIMARY KEY ("id"))`);
|
|
11
|
+
await queryRunner.query(`CREATE TABLE "core"."tags" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "tagName" character varying NOT NULL, "module" character varying DEFAULT 'MATTER', CONSTRAINT "PK_e7dc17249a1148a1970748eda99" PRIMARY KEY ("id"))`);
|
|
12
|
+
await queryRunner.query(`CREATE TABLE "core"."tasks_tags" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "task_id" integer NOT NULL, "tag_id" integer NOT NULL, CONSTRAINT "PK_45d381ab74666a7ed84d59b2ea3" PRIMARY KEY ("id"))`);
|
|
13
|
+
await queryRunner.query(`CREATE TABLE "core"."timesheet_summaries" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "matter_name" character varying, "group_name" character varying, "client_name" character varying, "title" character varying, "suffix" character varying, "file_path" character varying, "matter_id" integer, "invoice_id" integer, "status" character varying, "review_or_draft" character varying, "duration" numeric(10,2), "total_price" numeric(10,2), "reviewer_amount" numeric(10,2), "is_visible" boolean DEFAULT true, "date" date, "credit_amount" numeric, "balance_amount" numeric, "credit_note_id" integer, "original_amount" numeric, "invoiced_amount" numeric(10,2) DEFAULT '0', "remaining_amount" numeric(10,2), CONSTRAINT "PK_a63a7051eaed00488232252e059" PRIMARY KEY ("id"))`);
|
|
14
|
+
await queryRunner.query(`CREATE TABLE "user"."departments" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "department_name" character varying NOT NULL, "department_description" text, "department_slug" character varying NOT NULL, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_7772b894808a76fe3ac670f380b" UNIQUE ("department_name"), CONSTRAINT "UQ_e503cea5fd39d946c9c0dd227ef" UNIQUE ("department_slug"), CONSTRAINT "PK_839517a681a86bb84cbcc6a1e9d" PRIMARY KEY ("id"))`);
|
|
15
|
+
await queryRunner.query(`CREATE TABLE "user"."permissions" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "permission_name" character varying NOT NULL, "permission_slug" character varying NOT NULL, "permission_description" text, "module_name" character varying NOT NULL, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_b990eff1fc3540798960d80e452" UNIQUE ("permission_name"), CONSTRAINT "UQ_29415f56fb6612fc605e94e5b57" UNIQUE ("permission_slug"), CONSTRAINT "PK_920331560282b8bd21bb02290df" PRIMARY KEY ("id"))`);
|
|
16
|
+
await queryRunner.query(`CREATE TABLE "user"."role_permissions" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "permission_id" integer NOT NULL, "role_id" integer NOT NULL, CONSTRAINT "PK_84059017c90bfcb701b8fa42297" PRIMARY KEY ("id"))`);
|
|
17
|
+
await queryRunner.query(`CREATE TABLE "user"."roles" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "role_name" character varying NOT NULL, "role_slug" character varying NOT NULL, "is_main_role_slug" boolean NOT NULL DEFAULT false, "role_description" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_ac35f51a0f17e3e1fe121126039" UNIQUE ("role_name"), CONSTRAINT "PK_c1433d71a4838793a49dcad46ab" PRIMARY KEY ("id"))`);
|
|
18
|
+
await queryRunner.query(`CREATE TABLE "user"."user_roles" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "role_id" integer NOT NULL, CONSTRAINT "PK_8acd5cf26ebd158416f477de799" PRIMARY KEY ("id"))`);
|
|
19
|
+
await queryRunner.query(`CREATE TYPE "user"."approval_conditions_conditions_enum" AS ENUM('Price', 'Escalation')`);
|
|
20
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_conditions" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "approval_hierarchy_id" integer, "conditions" "user"."approval_conditions_conditions_enum", "price_from" double precision, "price_to" double precision, CONSTRAINT "PK_63833f608d5d29dc173f434f6fe" PRIMARY KEY ("id"))`);
|
|
21
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_hierarchy_users" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "approval_hierarchy_id" integer NOT NULL, "user_id" integer NOT NULL, CONSTRAINT "PK_6d249e097059b376595b19857cf" PRIMARY KEY ("id"))`);
|
|
22
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_hierarchy_roles" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "approval_hierarchy_id" integer NOT NULL, "role_id" integer NOT NULL, CONSTRAINT "PK_1d02edc16561faad3c0f2ec389d" PRIMARY KEY ("id"))`);
|
|
23
|
+
await queryRunner.query(`CREATE TYPE "user"."approval_hierarchy_initiator_type_enum" AS ENUM('Role', 'User')`);
|
|
24
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_hierarchy" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "name" character varying, "slug" character varying, "module" character varying, "task" character varying, "initiator_type" "user"."approval_hierarchy_initiator_type_enum" NOT NULL, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_1e576047372d0a6d4d436f7d1b9" UNIQUE ("slug"), CONSTRAINT "PK_cbedb8e6cec07d017c6db80102e" PRIMARY KEY ("id"))`);
|
|
25
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_level_escalation_users" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "approval_level_escalation_id" integer, "approver_id" integer, CONSTRAINT "PK_1774be9b3fa00134cf20fd6005a" PRIMARY KEY ("id"))`);
|
|
26
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_level_escalations" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "approval_level_id" integer, "escalation_approver_id" integer, "valid_till_hours" integer, "valid_till_minutes" integer, CONSTRAINT "PK_13b23d40aa13ffa5313cdcac87c" PRIMARY KEY ("id"))`);
|
|
27
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_levels" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "approval_hierarchy_id" integer, "approval_condition_id" integer, "level" character varying, "valid_till_hours" integer, "valid_till_minutes" integer, CONSTRAINT "PK_b0e46ae53996f7b1f9f5986b094" PRIMARY KEY ("id"))`);
|
|
28
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_level_users" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "approval_level_id" integer, "approver_id" integer, CONSTRAINT "PK_6dba8b8a70e7d3de3f17f4f75e0" PRIMARY KEY ("id"))`);
|
|
29
|
+
await queryRunner.query(`CREATE TYPE "user"."approval_journey_status_enum" AS ENUM('Pending', 'Approved', 'Rejected', 'AutoApproved', 'AutoRejected', 'Escalated', 'NA')`);
|
|
30
|
+
await queryRunner.query(`CREATE TABLE "user"."approval_journey" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "parent_id" character varying, "journy_type" character varying, "task_type" character varying, "approval_hierarchy_id" integer, "approvar_id" integer, "requester_id" integer, "level" character varying, "status" "user"."approval_journey_status_enum" NOT NULL DEFAULT 'Pending', "reject_reason" text, "is_approver_turn" boolean NOT NULL DEFAULT false, "valid_till" TIMESTAMP, "duration" character varying, "valid_to" TIMESTAMP, "journey_batch_id" uuid, CONSTRAINT "PK_15714c479cfaa392807ea75f6dd" PRIMARY KEY ("id"))`);
|
|
31
|
+
await queryRunner.query(`CREATE TABLE "user"."chats" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "chat_id" BIGSERIAL NOT NULL, "sender_id" integer NOT NULL, "receiver_id" integer NOT NULL, "message" text, "file_id" integer, "is_read" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_58ed9c09d472b79169582f51d13" PRIMARY KEY ("id", "chat_id"))`);
|
|
32
|
+
await queryRunner.query(`CREATE INDEX "IDX_cb75fc930b171da568cc0ffd41" ON "user"."chats" ("is_read") `);
|
|
33
|
+
await queryRunner.query(`CREATE INDEX "IDX_8685243ec9ac46c27a1935ea69" ON "user"."chats" ("created_at") `);
|
|
34
|
+
await queryRunner.query(`CREATE INDEX "IDX_294abca5a52489a05379cbf645" ON "user"."chats" ("sender_id", "receiver_id") `);
|
|
35
|
+
await queryRunner.query(`CREATE TABLE "user"."user_session_history" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer, "ip_address" character varying, "user_agent" text, "browser" character varying, "device" character varying, "platform" character varying, "login_timestamp" TIMESTAMP NOT NULL DEFAULT now(), "logout_timestamp" TIMESTAMP, "status" character varying, "session_id" character varying, CONSTRAINT "PK_551eea1477a271cad6ea13cb598" PRIMARY KEY ("id"))`);
|
|
36
|
+
await queryRunner.query(`CREATE TYPE "user"."upload_logs_module_enum" AS ENUM('HOLIDAY', 'USER', 'CLIENT', 'EXPENSE')`);
|
|
37
|
+
await queryRunner.query(`CREATE TYPE "user"."upload_logs_status_enum" AS ENUM('PENDING', 'IN_PROGRESS', 'COMPLETED', 'FAILED', 'PROCESSING')`);
|
|
38
|
+
await queryRunner.query(`CREATE TABLE "user"."upload_logs" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "module" "user"."upload_logs_module_enum", "file_name" character varying, "file_size" integer, "status" "user"."upload_logs_status_enum" NOT NULL DEFAULT 'PENDING', "total_records" integer, "success_count" integer, "failure_count" integer, "error_file_path" character varying, "started_at" TIMESTAMP NOT NULL DEFAULT now(), "completed_at" TIMESTAMP, "errors" json, CONSTRAINT "PK_7f8dd17fc1f6c7aedb46a4da030" PRIMARY KEY ("id"))`);
|
|
39
|
+
await queryRunner.query(`CREATE TABLE "user"."ownership_transfers" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "ownership_transfer_from_user_id" integer NOT NULL, "ownership_transfer_to_user_id" integer NOT NULL, "ownership_transfer_reason" text NOT NULL, "ownership_transfer_notes" text, "transferred_at" TIMESTAMP NOT NULL, "transferred_by_user_id" integer NOT NULL, "transfered_data" jsonb, CONSTRAINT "PK_e97d3c2e2f6a24be94fb9f087bb" PRIMARY KEY ("id"))`);
|
|
40
|
+
await queryRunner.query(`CREATE TYPE "timesheet"."user_shifts_allocation_type_enum" AS ENUM('role', 'user')`);
|
|
41
|
+
await queryRunner.query(`CREATE TABLE "timesheet"."user_shifts" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "current_shift_id" integer NOT NULL, "is_alternate_shift" boolean NOT NULL, "current_alternate_shift_id" integer, "shift_start_date" date NOT NULL, "shift_end_date" date NOT NULL, "planned_shift_id" integer, "effective_date" date, "shift_applied_by" integer, "allocation_type" "timesheet"."user_shifts_allocation_type_enum", CONSTRAINT "REL_d73716f961b931bd6c4c371f26" UNIQUE ("user_id"), CONSTRAINT "PK_1b56a21131266a44b0412e818bb" PRIMARY KEY ("id")); COMMENT ON COLUMN "timesheet"."user_shifts"."user_id" IS 'ID of the user associated with the shift'; COMMENT ON COLUMN "timesheet"."user_shifts"."current_shift_id" IS 'Current shift of the user'; COMMENT ON COLUMN "timesheet"."user_shifts"."is_alternate_shift" IS 'Check if the shift is alternate'; COMMENT ON COLUMN "timesheet"."user_shifts"."current_alternate_shift_id" IS 'Current alternate shift of the user'; COMMENT ON COLUMN "timesheet"."user_shifts"."shift_start_date" IS 'Start date of the shift'; COMMENT ON COLUMN "timesheet"."user_shifts"."shift_end_date" IS 'End date of the shift'; COMMENT ON COLUMN "timesheet"."user_shifts"."planned_shift_id" IS 'The planned shift id to be assigned to the user'; COMMENT ON COLUMN "timesheet"."user_shifts"."effective_date" IS 'The date when the planned shift becomes effective'; COMMENT ON COLUMN "timesheet"."user_shifts"."shift_applied_by" IS 'Shift applied by'; COMMENT ON COLUMN "timesheet"."user_shifts"."allocation_type" IS 'Allocation type'`);
|
|
42
|
+
await queryRunner.query(`CREATE TABLE "timesheet"."role_shifts" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "role_id" integer, "shift_id" integer, CONSTRAINT "PK_8e04fd18bdc96eb4a010395a9df" PRIMARY KEY ("id")); COMMENT ON COLUMN "timesheet"."role_shifts"."role_id" IS 'Role id'; COMMENT ON COLUMN "timesheet"."role_shifts"."shift_id" IS 'Shift id'`);
|
|
43
|
+
await queryRunner.query(`CREATE TABLE "timesheet"."shifts" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "shift_name" character varying NOT NULL, "shift_start_time" TIME NOT NULL, "shift_end_time" TIME NOT NULL, "break" integer NOT NULL, "grace" integer NOT NULL, "is_active" boolean NOT NULL, CONSTRAINT "PK_84d692e367e4d6cdf045828768c" PRIMARY KEY ("id")); COMMENT ON COLUMN "timesheet"."shifts"."shift_name" IS 'Name of the shift'; COMMENT ON COLUMN "timesheet"."shifts"."shift_start_time" IS 'Start time of the shift'; COMMENT ON COLUMN "timesheet"."shifts"."shift_end_time" IS 'End time of the shift'; COMMENT ON COLUMN "timesheet"."shifts"."break" IS 'Break in minutes'; COMMENT ON COLUMN "timesheet"."shifts"."grace" IS 'Grace in minutes'; COMMENT ON COLUMN "timesheet"."shifts"."is_active" IS 'Is active'`);
|
|
44
|
+
await queryRunner.query(`CREATE TABLE "core"."task_comments" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "task_id" integer NOT NULL, "sub_task_id" integer, "is_parent" boolean NOT NULL DEFAULT false, "comment" character varying NOT NULL, CONSTRAINT "PK_83b99b0b03db29d4cafcb579b77" PRIMARY KEY ("id"))`);
|
|
45
|
+
await queryRunner.query(`CREATE TABLE "core"."sub_tasks_tags" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "sub_task_id" integer NOT NULL, "tag_id" integer NOT NULL, CONSTRAINT "PK_03048f632fd00d3888141cbd0dc" PRIMARY KEY ("id"))`);
|
|
46
|
+
await queryRunner.query(`CREATE TABLE "core"."task_reminders" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "task_id" integer NOT NULL, "sub_task_id" integer, "reminder_at" TIMESTAMP NOT NULL, "is_completed" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_5a889415fd9055ec0845bc9bd29" PRIMARY KEY ("id"))`);
|
|
47
|
+
await queryRunner.query(`CREATE TABLE "core"."subtask_users" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "subtask_id" integer NOT NULL, "user_id" integer NOT NULL, CONSTRAINT "PK_4edd1bc8cb52b335665cd1c4dc3" PRIMARY KEY ("id"))`);
|
|
48
|
+
await queryRunner.query(`CREATE TABLE "core"."task_types" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "name" character varying(100) NOT NULL, "description" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "PK_232576669c4df1f0a15e1300ce2" PRIMARY KEY ("id"))`);
|
|
49
|
+
await queryRunner.query(`CREATE TABLE "core"."task_milestones" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "name" character varying(100) NOT NULL, "description" text, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "PK_ca8a8b1639233947fed787b7365" PRIMARY KEY ("id"))`);
|
|
50
|
+
await queryRunner.query(`CREATE TABLE "core"."sub_tasks" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "sub_task_id" character varying NOT NULL, "task_id" integer, "title" character varying(200) NOT NULL, "task_type_id" integer, "description" text, "assigned_to" integer, "priority" character varying, "progress" integer DEFAULT '0', "invoice_id" integer, "milestone_id" integer, "task_budget" numeric, "standard_fees" numeric, "effort_hours" numeric, "estimated_hours" numeric, "file_id" integer, "notes" text, "status" character varying, "start_date" TIMESTAMP, "due_date" TIMESTAMP, "matter_id" integer, CONSTRAINT "PK_0028874355f68f2ed21a89c2faf" PRIMARY KEY ("id"))`);
|
|
51
|
+
await queryRunner.query(`CREATE TYPE "timesheet"."timesheet-events_task_type_enum" AS ENUM('TASK', 'SUBTASK')`);
|
|
52
|
+
await queryRunner.query(`CREATE TABLE "timesheet"."timesheet-events" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "title" character varying(255) NOT NULL, "task_type" "timesheet"."timesheet-events_task_type_enum", "task_id" integer, "subtask_id" integer, "description" text, "event_type" character varying NOT NULL DEFAULT 'Billable', "start_date" date NOT NULL, "start_time" TIME NOT NULL, "end_date" date NOT NULL, "end_time" TIME NOT NULL, "is_all_day" boolean NOT NULL DEFAULT false, "matter_id" integer, "is_leave" boolean NOT NULL DEFAULT false, "work_category" character varying, "status" character varying DEFAULT 'PENDING', "app_title" character varying(255) NOT NULL, "app_name" character varying(255) NOT NULL, "app_type" character varying(255), "hourly_price" numeric(10,2), "total_price" numeric(10,2), "event_hours" character varying, "timesheet_id" integer, "origin_date" date, "invoice_id" integer, CONSTRAINT "PK_bcabfac3cbc1fac67704f9a9489" PRIMARY KEY ("id")); COMMENT ON COLUMN "timesheet"."timesheet-events"."user_id" IS 'ID of the user associated with the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."title" IS 'Title of the task of related matter'; COMMENT ON COLUMN "timesheet"."timesheet-events"."task_type" IS 'Type of the task of related matter'; COMMENT ON COLUMN "timesheet"."timesheet-events"."task_id" IS 'ID of the task of related matter'; COMMENT ON COLUMN "timesheet"."timesheet-events"."subtask_id" IS 'ID of the subtask of related matter'; COMMENT ON COLUMN "timesheet"."timesheet-events"."description" IS 'Description of the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."event_type" IS 'Type of the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."start_date" IS 'Start date of the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."start_time" IS 'Start time of the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."end_date" IS 'End date of the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."end_time" IS 'End time of the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."is_all_day" IS 'Indicates if the timesheet event entry spans the entire day'; COMMENT ON COLUMN "timesheet"."timesheet-events"."matter_id" IS 'Associated matter or case ID (nullable)'; COMMENT ON COLUMN "timesheet"."timesheet-events"."is_leave" IS 'Indicates if the timesheet event entry represents leave'; COMMENT ON COLUMN "timesheet"."timesheet-events"."work_category" IS 'Work category of the timesheet event'; COMMENT ON COLUMN "timesheet"."timesheet-events"."status" IS 'Status of the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."app_title" IS 'Title of the application managing the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."app_name" IS 'Name of the application managing the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."app_type" IS 'Type of the application managing the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."hourly_price" IS 'Hourly price associated with the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."total_price" IS 'Total price calculated for the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."event_hours" IS 'Total hours calculated for the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."timesheet_id" IS 'ID of the timesheet associated with the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."origin_date" IS 'Origin date of the timesheet event entry'; COMMENT ON COLUMN "timesheet"."timesheet-events"."invoice_id" IS 'ID of the invoice associated with the timesheet event entry'`);
|
|
53
|
+
await queryRunner.query(`CREATE TABLE "timesheet"."timesheet_comments" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "timesheet_id" integer NOT NULL, "user_id" integer NOT NULL, "comment" text NOT NULL, CONSTRAINT "PK_795e603a8cf0e3dcf6dc18361d4" PRIMARY KEY ("id")); COMMENT ON COLUMN "timesheet"."timesheet_comments"."timesheet_id" IS 'ID of the timesheet associated with the comment'; COMMENT ON COLUMN "timesheet"."timesheet_comments"."user_id" IS 'ID of the user who made the comment'; COMMENT ON COLUMN "timesheet"."timesheet_comments"."comment" IS 'The comment text'`);
|
|
54
|
+
await queryRunner.query(`CREATE TYPE "timesheet"."timesheets_approval_flow_type_enum" AS ENUM('REPORTING_MANAGER_BASED', 'HIERARCHY_BASED')`);
|
|
55
|
+
await queryRunner.query(`CREATE TABLE "timesheet"."timesheets" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "week_start" date NOT NULL, "week_end" date NOT NULL, "status" character varying NOT NULL DEFAULT 'PENDING', "submitted_at" TIMESTAMP, "approved_at" TIMESTAMP, "approved_by" integer, "is_resubmitted" boolean NOT NULL DEFAULT false, "resubmitted_at" TIMESTAMP, "approval_flow_type" "timesheet"."timesheets_approval_flow_type_enum", CONSTRAINT "PK_1dc280b68c9353ecce41a34be71" PRIMARY KEY ("id")); COMMENT ON COLUMN "timesheet"."timesheets"."status" IS 'PENDING | APPROVED |SEND-BACK'`);
|
|
56
|
+
await queryRunner.query(`CREATE TABLE "core"."task_users" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "task_id" integer NOT NULL, "user_id" integer NOT NULL, CONSTRAINT "PK_b59dab7278e3e875c391e0831a8" PRIMARY KEY ("id"))`);
|
|
57
|
+
await queryRunner.query(`CREATE TABLE "core"."matter_team_members" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "matter_id" integer NOT NULL, "user_id" integer NOT NULL, "hourly_rate" numeric(10,2), CONSTRAINT "PK_e98398ca1863e6a5b0d2189beae" PRIMARY KEY ("id"))`);
|
|
58
|
+
await queryRunner.query(`CREATE TABLE "core"."superset" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "chart_id" integer, "datasource_id" integer NOT NULL, "chart_embed_link" character varying(255), "datasource_name" character varying, "viz_type" character varying, "slice_name" character varying(255), "params" character varying(2000), "isfavourite" boolean NOT NULL DEFAULT false, "ispermanent" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_d4747dbcf9f9b1f48d4a4bc0ec4" PRIMARY KEY ("id"))`);
|
|
59
|
+
await queryRunner.query(`CREATE TABLE "user"."users" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "name" character varying NOT NULL, "email" character varying NOT NULL, "password" character varying, "language" character varying DEFAULT 'en', "timezone" character varying DEFAULT 'Asia/Kolkata', "phone_number" character varying, "country_code" character varying, "department_id" integer, "reports_to" jsonb, "file_id" integer, "refresh_token" character varying, "reset_token" character varying, "reset_token_expires" TIMESTAMP, "is_active" boolean NOT NULL DEFAULT true, "is_verified" boolean NOT NULL DEFAULT false, "hourly_rate" integer, "ntrackid" integer, "ntrackempid" character varying, "ntrack_password" character varying, CONSTRAINT "UQ_97672ac88f789774dd47f7c8be3" UNIQUE ("email"), CONSTRAINT "PK_a3ffb1c0c8416b9fc6f907b7433" PRIMARY KEY ("id"))`);
|
|
60
|
+
await queryRunner.query(`CREATE TABLE "core"."expenses" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "matter_id" integer NOT NULL, "invoice_id" integer, "description" text, "expenseType" character varying(50) NOT NULL, "requester_id" integer, "councillor_name" character varying(255), "amount" numeric(10,2) NOT NULL, "proposed_date_of_hearing" TIMESTAMP, "date_of_hearing" TIMESTAMP, "file_id" integer, "attachments" json, "paid_by" integer, "status" character varying(50) NOT NULL DEFAULT 'Pending', "approval_status" character varying(50), "reject_reason" character varying, "payment_method" character varying(50), "cost_to_client" boolean, "cost_to_company" boolean, "bill_to_client" boolean, "types_of_billed" character varying(50), "date_of_expense" TIMESTAMP, "reimbursement_category" character varying(50), "expense_category" character varying(50), "client_id" integer, "credit_amount" numeric, "balance_amount" numeric, "credit_note_id" integer, "original_amount" numeric, "invoiced_amount" numeric(10,2) DEFAULT '0', "remaining_amount" numeric(10,2), CONSTRAINT "PK_94c3ceb17e3140abc9282c20610" PRIMARY KEY ("id"))`);
|
|
61
|
+
await queryRunner.query(`CREATE TYPE "core"."invoice_items_item_type_enum" AS ENUM('task', 'expense', 'summary', 'timesheet_event', 'fixed_item')`);
|
|
62
|
+
await queryRunner.query(`CREATE TABLE "core"."invoice_items" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "invoice_id" integer NOT NULL, "item_type" "core"."invoice_items_item_type_enum" NOT NULL, "item_id" integer NOT NULL, "amount" numeric(10,2) NOT NULL, "credit_amount" numeric, "balance_amount" numeric, "credit_note_id" integer, CONSTRAINT "PK_53b99f9e0e2945e69de1a12b75a" PRIMARY KEY ("id"))`);
|
|
63
|
+
await queryRunner.query(`CREATE INDEX "idx_invoice_items_item" ON "core"."invoice_items" ("item_type", "item_id") `);
|
|
64
|
+
await queryRunner.query(`CREATE INDEX "idx_invoice_items_invoice_id" ON "core"."invoice_items" ("invoice_id") `);
|
|
65
|
+
await queryRunner.query(`CREATE TYPE "core"."credit_notes_status_enum" AS ENUM('Pending', 'Approved', 'Rejected')`);
|
|
66
|
+
await queryRunner.query(`CREATE TABLE "core"."credit_notes" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "invoice_number" character varying NOT NULL, "invoice_id" integer NOT NULL, "credit_note_id" character varying NOT NULL, "bill_to" jsonb NOT NULL, "bill_from" jsonb NOT NULL, "reason_for_credit_note" character varying NOT NULL, "sub_total" numeric NOT NULL, "tds_rate" numeric, "tds_amount" numeric NOT NULL, "net_credit_after_tds" numeric NOT NULL, "download_url" character varying, "preview_url" character varying, "user_id" integer, "status" "core"."credit_notes_status_enum" NOT NULL DEFAULT 'Pending', CONSTRAINT "REL_ab75ae7ceab2ad0e3c77768c37" UNIQUE ("invoice_id"), CONSTRAINT "PK_4933888a20b5469e119ad74b9e9" PRIMARY KEY ("id")); COMMENT ON COLUMN "core"."credit_notes"."status" IS 'Status of the credit note'`);
|
|
67
|
+
await queryRunner.query(`CREATE TYPE "core"."tasks_sourcetype_enum" AS ENUM('TEMPLATE', 'INDIVIDUAL')`);
|
|
68
|
+
await queryRunner.query(`CREATE TABLE "core"."tasks" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "matter_id" integer, "title" character varying(200), "task_type_id" integer, "description" text, "assigned_to" integer, "priority" character varying, "progress" integer DEFAULT '0', "invoice_id" integer, "sourceType" "core"."tasks_sourcetype_enum" NOT NULL DEFAULT 'INDIVIDUAL', "milestone_id" integer, "task_budget" numeric, "standard_fees" numeric, "effort_hours" numeric, "estimated_hours" numeric, "file_id" integer, "notes" text, "status" character varying(20), "start_date" date, "due_date" date, "credit_amount" numeric, "balance_amount" numeric, "credit_note_id" integer, "original_amount" numeric, "invoiced_amount" numeric(10,2) DEFAULT '0', "remaining_amount" numeric(10,2), CONSTRAINT "PK_8d12ff38fcc62aaba2cab748772" PRIMARY KEY ("id"))`);
|
|
69
|
+
await queryRunner.query(`CREATE TABLE "core"."template_tasks" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "taskName" character varying(225) NOT NULL, "standardFees" numeric(10,2), "estimatedHours" integer, "description" character varying(255), "template_id" integer, CONSTRAINT "PK_b57fa3e0f306c9aeb0891541cd7" PRIMARY KEY ("id"))`);
|
|
70
|
+
await queryRunner.query(`CREATE TABLE "core"."templates" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "templateName" text NOT NULL, "description" text, "categoryId" integer, "fileId" integer, "templateData" jsonb, CONSTRAINT "PK_515948649ce0bbbe391de702ae5" PRIMARY KEY ("id"))`);
|
|
71
|
+
await queryRunner.query(`CREATE TABLE "core"."currencies" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "name" character varying NOT NULL, "code" character varying NOT NULL, "symbol" character varying NOT NULL, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "UQ_976da6960ec4f0c96c26e3dffa0" UNIQUE ("name"), CONSTRAINT "UQ_9f8d0972aeeb5a2277e40332d29" UNIQUE ("code"), CONSTRAINT "PK_d528c54860c4182db13548e08c4" PRIMARY KEY ("id"))`);
|
|
72
|
+
await queryRunner.query(`CREATE TABLE "core"."matters" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "client_id" integer NOT NULL, "title" character varying(200) NOT NULL, "billing_mode" text array NOT NULL, "standard_fee" numeric(10,2) NOT NULL, "overtime_fee_type" character varying, "overtime_fixed_rate" numeric(10,2), "overtime_hourly_rate" numeric(10,2), "startDate" TIMESTAMP, "dueDate" TIMESTAMP, "departmentId" integer, "userId" integer, "notes" text, "created_for" integer, "templateId" integer, "fileId" integer, "status" character varying(20), "reason_for_matter" character varying(20), "approval_status" character varying, "reject_reason" character varying, "priority" character varying(10), "riskLevel" character varying(10), "elId" integer, "signatureId" integer, "progress" integer, "flowaceData" jsonb, "currency_id" integer, "is_archived" boolean NOT NULL DEFAULT false, "partnerId" integer, CONSTRAINT "PK_b6e879e12614eaedc4a6fdcb2b3" PRIMARY KEY ("id"))`);
|
|
73
|
+
await queryRunner.query(`CREATE TYPE "core"."invoices_invoice_type_enum" AS ENUM('Expense', 'Matter')`);
|
|
74
|
+
await queryRunner.query(`CREATE TABLE "core"."invoices" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "matter_id" integer, "client_id" integer NOT NULL, "partner_id" integer NOT NULL, "status" character varying(20) NOT NULL, "amount" numeric(10,2), "tds_amount" numeric(10,2), "tds_percentage" numeric(10,2), "is_tds_applicable" boolean NOT NULL DEFAULT false, "pending_amount" numeric(10,2), "total_amount" numeric(10,2), "expense_details" text, "custom_terms" text, "category" character varying(100), "invoice_no" character varying(100), "billing_date" TIMESTAMP, "due_date" TIMESTAMP, "pdf_url" text, "file_id" integer, "tax" numeric(10,2), "approved_at" TIMESTAMP, "paid_at" TIMESTAMP, "is_draft" boolean NOT NULL DEFAULT false, "invoice_type" "core"."invoices_invoice_type_enum", "approval_status" character varying(50) NOT NULL DEFAULT 'draft', "quickbooks_id" character varying(255), "quickbooks_sync_token" character varying(50), "last_synced_at" TIMESTAMP, "approved_by" integer, "approval_requested_by" integer, CONSTRAINT "PK_668cef7c22a427fd822cc1be3ce" PRIMARY KEY ("id"))`);
|
|
75
|
+
await queryRunner.query(`CREATE INDEX "idx_invoices_status" ON "core"."invoices" ("status") `);
|
|
76
|
+
await queryRunner.query(`CREATE INDEX "idx_invoices_client_id" ON "core"."invoices" ("client_id") `);
|
|
77
|
+
await queryRunner.query(`CREATE INDEX "idx_invoices_matter_id" ON "core"."invoices" ("matter_id") `);
|
|
78
|
+
await queryRunner.query(`CREATE TYPE "core"."clients_client_type_enum" AS ENUM('Corporation', 'Partnership', 'Government Entity', 'Individual')`);
|
|
79
|
+
await queryRunner.query(`CREATE TYPE "core"."clients_status_enum" AS ENUM('Prospect', 'Active', 'Inactive')`);
|
|
80
|
+
await queryRunner.query(`CREATE TYPE "core"."clients_engagement_type_enum" AS ENUM('Retainer', 'Project-Based', 'Hourly', 'One-Time')`);
|
|
81
|
+
await queryRunner.query(`CREATE TABLE "core"."clients" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "clientName" character varying(100), "group_id" integer, "client_type" "core"."clients_client_type_enum" DEFAULT 'Individual', "pan_no" character varying(10), "city" character varying(100), "country" character varying(100), "gst_no" character varying(100), "is_tds_applicable" boolean, "file_id" integer, "flowace_data" jsonb, "status" "core"."clients_status_enum", "engagement_type" "core"."clients_engagement_type_enum", "quickbooks_id" character varying(255), "quickbooks_sync_token" character varying(50), "last_synced_at" TIMESTAMP, CONSTRAINT "PK_f1ab7cf3a5714dbc6bb4e1c28a4" PRIMARY KEY ("id"))`);
|
|
82
|
+
await queryRunner.query(`CREATE TABLE "core"."addresses" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "clientId" integer NOT NULL, "address" character varying, "billingContactPerson" character varying(100), "invoiceFrequency" character varying, "invoiceDayOfWeek" integer, "attachment" character varying, "notes" text, CONSTRAINT "UQ_ae1b6a2290ac79ac41dff9aa574" UNIQUE ("clientId"), CONSTRAINT "REL_ae1b6a2290ac79ac41dff9aa57" UNIQUE ("clientId"), CONSTRAINT "PK_745d8f43d3af10ab8247465e450" PRIMARY KEY ("id"))`);
|
|
83
|
+
await queryRunner.query(`CREATE TYPE "notification"."alerts_type_enum" AS ENUM('matter', 'invoice', 'other')`);
|
|
84
|
+
await queryRunner.query(`CREATE TYPE "notification"."alerts_priority_enum" AS ENUM('critical', 'high', 'normal', 'low', 'bulk')`);
|
|
85
|
+
await queryRunner.query(`CREATE TYPE "notification"."alerts_status_enum" AS ENUM('unread', 'read', 'archived', 'deleted')`);
|
|
86
|
+
await queryRunner.query(`CREATE TABLE "notification"."alerts" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "title" character varying(255) NOT NULL, "message" text NOT NULL, "type" "notification"."alerts_type_enum" NOT NULL DEFAULT 'other', "priority" "notification"."alerts_priority_enum" NOT NULL DEFAULT 'normal', "status" "notification"."alerts_status_enum" NOT NULL DEFAULT 'unread', "user_id" integer NOT NULL, "read_at" TIMESTAMP, "expiresAt" TIMESTAMP, "metadata" json, "actionData" json, "related_entity_id" character varying(100), "related_entity_type" character varying(50), CONSTRAINT "PK_60f895662df096bfcdfab7f4b96" PRIMARY KEY ("id")); COMMENT ON COLUMN "notification"."alerts"."title" IS 'Title of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."message" IS 'Message of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."type" IS 'Type of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."priority" IS 'Priority of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."status" IS 'Status of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."user_id" IS 'ID of the user associated with the alert entry'; COMMENT ON COLUMN "notification"."alerts"."read_at" IS 'Read at of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."expiresAt" IS 'Expires at of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."metadata" IS 'Metadata of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."actionData" IS 'Action data of the alert entry'; COMMENT ON COLUMN "notification"."alerts"."related_entity_id" IS 'ID of related business entity (matter, invoice, etc.)'; COMMENT ON COLUMN "notification"."alerts"."related_entity_type" IS 'Type of related business entity'`);
|
|
87
|
+
await queryRunner.query(`CREATE TABLE "core"."countries" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "name" character varying, "iso3" character(3), "iso2" character(2), "numeric_code" character(3), "phonecode" character varying, "capital" character varying, "currency" character varying, "currency_name" character varying, "currency_symbol" character varying, "tld" character varying, "native" character varying, "region" character varying, "subregion" character varying, "nationality" character varying, "latitude" numeric(10,8), "longitude" numeric(11,8), "emoji" character varying, "emojiU" character varying, "timezones" json, "status" boolean DEFAULT false, CONSTRAINT "UQ_b29f9172f8b660e7834000c4246" UNIQUE ("iso3"), CONSTRAINT "UQ_9706e3c52695ce44a202f24c26b" UNIQUE ("iso2"), CONSTRAINT "PK_b2d7006793e8697ab3ae2deff18" PRIMARY KEY ("id"))`);
|
|
88
|
+
await queryRunner.query(`CREATE TABLE "core"."cities" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "name" character varying, "latitude" numeric(10,8), "longitude" numeric(11,8), "status" boolean DEFAULT false, "country_id" integer, CONSTRAINT "PK_4762ffb6e5d198cfec5606bc11e" PRIMARY KEY ("id"))`);
|
|
89
|
+
await queryRunner.query(`CREATE TYPE "user"."leave_balances_credit_frequency_enum" AS ENUM('monthly', 'quarterly', 'half_yearly', 'yearly')`);
|
|
90
|
+
await queryRunner.query(`CREATE TABLE "user"."leave_balances" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "leave_type_id" integer NOT NULL, "entitlement_id" integer NOT NULL, "total_entitled" numeric(10,2) NOT NULL DEFAULT '0', "balance" numeric(10,2) NOT NULL DEFAULT '0', "used_balance" numeric(10,2) NOT NULL DEFAULT '0', "pending_balance" numeric(10,2) NOT NULL DEFAULT '0', "carried_forward" numeric(10,2) NOT NULL DEFAULT '0', "accrual_rate" numeric(10,4) NOT NULL, "credit_frequency" "user"."leave_balances_credit_frequency_enum" NOT NULL DEFAULT 'monthly', "last_credited_date" date, "next_credit_date" date NOT NULL, "policy_start_date" date NOT NULL, "policy_end_date" date NOT NULL, "is_active" boolean NOT NULL DEFAULT true, "cron_enabled" boolean NOT NULL DEFAULT true, "last_cron_run" TIMESTAMP, CONSTRAINT "PK_a1d90dff48fb2bfd23a7163d077" PRIMARY KEY ("id"))`);
|
|
91
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_dc1ba65e369fbfe829ec3acb7c" ON "user"."leave_balances" ("user_id", "leave_type_id", "entitlement_id") `);
|
|
92
|
+
await queryRunner.query(`CREATE TYPE "user"."leave_requests_start_date_type_enum" AS ENUM('full_day', 'first_half', 'second_half')`);
|
|
93
|
+
await queryRunner.query(`CREATE TYPE "user"."leave_requests_end_date_type_enum" AS ENUM('full_day', 'first_half', 'second_half')`);
|
|
94
|
+
await queryRunner.query(`CREATE TYPE "user"."leave_requests_days_type_enum" AS ENUM('full_day', 'first_half', 'second_half')`);
|
|
95
|
+
await queryRunner.query(`CREATE TYPE "user"."leave_requests_status_enum" AS ENUM('pending', 'approved', 'rejected', 'cancelled', 'cancelation_requested')`);
|
|
96
|
+
await queryRunner.query(`CREATE TYPE "user"."leave_requests_half_day_position_enum" AS ENUM('start_date', 'end_date', 'none')`);
|
|
97
|
+
await queryRunner.query(`CREATE TYPE "user"."leave_requests_approval_flow_type_enum" AS ENUM('REPORTING_MANAGER_BASED', 'HIERARCHY_BASED')`);
|
|
98
|
+
await queryRunner.query(`CREATE TABLE "user"."leave_requests" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "leave_type_id" integer NOT NULL, "leave_balance_id" integer, "start_date" date NOT NULL, "end_date" date NOT NULL, "start_date_type" "user"."leave_requests_start_date_type_enum" NOT NULL DEFAULT 'full_day', "end_date_type" "user"."leave_requests_end_date_type_enum" NOT NULL DEFAULT 'full_day', "total_days" numeric(10,2) NOT NULL, "days_type" "user"."leave_requests_days_type_enum" NOT NULL DEFAULT 'full_day', "reason" character varying(500), "cancel_reason" character varying(500), "status" "user"."leave_requests_status_enum" NOT NULL DEFAULT 'pending', "approver_id" integer, "remarks" character varying(500), "attachment_url" character varying, "attachment_preview_url" character varying, "reject_reason" character varying(500), "applied_at" TIMESTAMP NOT NULL DEFAULT now(), "approved_at" TIMESTAMP, "cancelled_at" TIMESTAMP, "cancelation_requested_at" TIMESTAMP, "rejected_at" TIMESTAMP, "is_balance_debited" boolean NOT NULL DEFAULT false, "half_day_position" "user"."leave_requests_half_day_position_enum" NOT NULL DEFAULT 'none', "approval_flow_type" "user"."leave_requests_approval_flow_type_enum", CONSTRAINT "PK_d3abcf9a16cef1450129e06fa9f" PRIMARY KEY ("id"))`);
|
|
99
|
+
await queryRunner.query(`CREATE TABLE "user"."leave_types" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "name" character varying, "leave_type_slug" character varying, "code" character varying, "description" character varying, "is_active" boolean DEFAULT true, "is_entitlement_situational" boolean DEFAULT false, "entitlement_frequency" character varying(20), "no_of_leaves" integer, "allow_carry_forward" boolean DEFAULT false, CONSTRAINT "UQ_e41bb9537ef5e65ee2de2cfa81a" UNIQUE ("name"), CONSTRAINT "UQ_600530eb1d9f853dd746e5819c4" UNIQUE ("code"), CONSTRAINT "PK_359223e0755d19711813cd07394" PRIMARY KEY ("id"))`);
|
|
100
|
+
await queryRunner.query(`CREATE TYPE "user"."entitlements_entitlement_type_enum" AS ENUM('individual', 'multiple')`);
|
|
101
|
+
await queryRunner.query(`CREATE TABLE "user"."entitlements" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "entitlement_type" "user"."entitlements_entitlement_type_enum", "department_id" integer NOT NULL, "leave_type_id" integer NOT NULL, "start_date" date NOT NULL, "end_date" date NOT NULL, "entitlements" numeric(10,2), "original_entitlements" numeric(10,2), "user_id" integer, "is_active" boolean NOT NULL DEFAULT true, "last_calculated_date" date, "enable_carry_forward" boolean NOT NULL DEFAULT true, "max_carry_forward_percentage" numeric(5,2) NOT NULL DEFAULT '100', CONSTRAINT "PK_6a45cb6f5747d49365a879bffde" PRIMARY KEY ("id"))`);
|
|
102
|
+
await queryRunner.query(`CREATE TABLE "user"."file_data" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "fileName" character varying NOT NULL, "urlLocation" character varying NOT NULL, "fileDescription" character varying, "fileType" character varying NOT NULL, "previewUrl" character varying, CONSTRAINT "PK_69875c852f5133f7ebea403609b" PRIMARY KEY ("id"))`);
|
|
103
|
+
await queryRunner.query(`CREATE TABLE "core"."fixed_invoice_items" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "invoice_id" integer NOT NULL, "description" text NOT NULL, "amount" numeric(10,2) NOT NULL, CONSTRAINT "PK_8e6ee27ebfd66fb54d21dcc4553" PRIMARY KEY ("id"))`);
|
|
104
|
+
await queryRunner.query(`CREATE INDEX "idx_fixed_invoice_items_invoice_id" ON "core"."fixed_invoice_items" ("invoice_id") `);
|
|
105
|
+
await queryRunner.query(`CREATE TABLE "user"."gst" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "gst_number" character varying(15) NOT NULL, "gst_info" json, CONSTRAINT "UQ_c19116420b107f4a220edacbe3a" UNIQUE ("gst_number"), CONSTRAINT "PK_3994447d918ac0ceeace4276675" PRIMARY KEY ("id")); COMMENT ON COLUMN "user"."gst"."gst_number" IS 'GST number associated with the entity'; COMMENT ON COLUMN "user"."gst"."gst_info" IS 'Additional information about the GST in JSON format'`);
|
|
106
|
+
await queryRunner.query(`CREATE INDEX "idx_gst_number" ON "user"."gst" ("gst_number") `);
|
|
107
|
+
await queryRunner.query(`CREATE TABLE "timesheet"."holidays" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "holiday_date" date NOT NULL, "holiday_name" character varying(255) NOT NULL, "slug" character varying(255), "full_or_half_day" character varying(255), "repeat_annually" boolean NOT NULL DEFAULT false, "is_active" boolean NOT NULL DEFAULT true, CONSTRAINT "PK_3646bdd4c3817d954d830881dfe" PRIMARY KEY ("id")); COMMENT ON COLUMN "timesheet"."holidays"."holiday_date" IS 'Date of the holiday'; COMMENT ON COLUMN "timesheet"."holidays"."holiday_name" IS 'Name of the holiday'; COMMENT ON COLUMN "timesheet"."holidays"."slug" IS 'Slug of the holiday'; COMMENT ON COLUMN "timesheet"."holidays"."full_or_half_day" IS 'Whether the holiday is full day or half day'; COMMENT ON COLUMN "timesheet"."holidays"."repeat_annually" IS 'Whether the holiday is repeated annually'`);
|
|
108
|
+
await queryRunner.query(`CREATE TYPE "core"."user_invoice_template_table_gst_type_enum" AS ENUM('IGST', 'CGST_PLUS_SGST')`);
|
|
109
|
+
await queryRunner.query(`CREATE TYPE "core"."user_invoice_template_table_tds_type_enum" AS ENUM('194C', '194J')`);
|
|
110
|
+
await queryRunner.query(`CREATE TABLE "core"."user_invoice_template_table" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "enabled_professional_summery_column" boolean DEFAULT true, "professional_summery_column_label" character varying(255), "professional_summery_column_width" double precision, "enabled_description_column" boolean, "description_column_label" character varying(255), "description_column_width" double precision, "enabled_total_cost_column" boolean, "total_cost_column_label" character varying(255), "total_cost_column_width" double precision, "enabled_gst_column" boolean DEFAULT false, "gst_column_label" character varying(255) DEFAULT 'GST', "gst_column_width" double precision, "enabled_gst_value_column" boolean DEFAULT false, "gst_type" "core"."user_invoice_template_table_gst_type_enum", "gst_rate" double precision, "enabled_tds_column" boolean DEFAULT false, "tds_column_label" character varying(255) DEFAULT 'TDS', "tds_column_width" double precision, "tds_type" "core"."user_invoice_template_table_tds_type_enum", "tds_rate" double precision, "invoice_template_id" integer, CONSTRAINT "REL_579a059a39a8dbf35b7740fd75" UNIQUE ("invoice_template_id"), CONSTRAINT "PK_038cefd20b39d3052c58d92f74e" PRIMARY KEY ("id"))`);
|
|
111
|
+
await queryRunner.query(`CREATE TABLE "core"."user_invoice_template_header" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "document_title" character varying(255), "show_document_title" character varying(255), "show_organization_name" character varying(255) DEFAULT true, "show_organization_logo" character varying(255), "organization_logo" character varying(255), "attachment" character varying(255), "logo_resize_factor" character varying(255), "invoice_template_id" integer, CONSTRAINT "REL_c334b7c36b38d6ae1154c1c9ad" UNIQUE ("invoice_template_id"), CONSTRAINT "PK_c16bcf1025739f02224349d624f" PRIMARY KEY ("id"))`);
|
|
112
|
+
await queryRunner.query(`CREATE TABLE "core"."user_invoice_template_footer" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "enabled_notes" boolean DEFAULT false, "notes_label" character varying(255), "enabled_term_and_condition" boolean DEFAULT false, "term_and_condition_label" character varying(255), "use_default_term_and_condition" boolean DEFAULT false, "term_and_condition_template_id" integer, "custom_term_and_condition" character varying, "enabled_signature" boolean DEFAULT false, "signature_type" character varying, "signature_url" character varying, "signature_placement" character varying, "enabled_payment_details" boolean DEFAULT true, "account_holder_name" character varying, "account_number" character varying, "ifsc_code" character varying, "upi_id" character varying, "payment_terms" character varying, "invoice_template_id" integer, CONSTRAINT "REL_f98f17ab7e0ce6f51c0e79b4b7" UNIQUE ("invoice_template_id"), CONSTRAINT "PK_ec1e986bc837889dfa1b628474c" PRIMARY KEY ("id"))`);
|
|
113
|
+
await queryRunner.query(`CREATE TYPE "core"."user_invoice_templates_paper_size_enum" AS ENUM('A5', 'A4', 'LETTER')`);
|
|
114
|
+
await queryRunner.query(`CREATE TYPE "core"."user_invoice_templates_origination_enum" AS ENUM('PORTRAIT', 'LANDSCAPE')`);
|
|
115
|
+
await queryRunner.query(`CREATE TYPE "core"."user_invoice_templates_status_enum" AS ENUM('DRAFT', 'PUBLISHED')`);
|
|
116
|
+
await queryRunner.query(`CREATE TABLE "core"."user_invoice_templates" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "parent_slug" character varying(255), "original_template_slug" character varying(255), "template_name" character varying(255) NOT NULL, "slug" character varying(255) NOT NULL, "paper_size" "core"."user_invoice_templates_paper_size_enum", "origination" "core"."user_invoice_templates_origination_enum" DEFAULT 'PORTRAIT', "margin_top" double precision, "margin_bottom" double precision, "margin_left" double precision, "margin_right" double precision, "pdf_font" character varying(255), "currency_type" character varying(255), "exchange_rate" double precision, "user_id" integer, "status" "core"."user_invoice_templates_status_enum" NOT NULL DEFAULT 'PUBLISHED', "show_base_converted" character varying(255), CONSTRAINT "PK_b2f6a78334e875ecd898571a035" PRIMARY KEY ("id"))`);
|
|
117
|
+
await queryRunner.query(`CREATE TABLE "core"."matter_task_view_filters" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "view_type" character varying(100) NOT NULL, "filters" jsonb, CONSTRAINT "PK_7a6fcd8afb71896e6683863b511" PRIMARY KEY ("id"))`);
|
|
118
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_bffd2af546d0f5eb967492c2ad" ON "core"."matter_task_view_filters" ("user_id") `);
|
|
119
|
+
await queryRunner.query(`CREATE TABLE "core"."payments" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "invoice_id" integer NOT NULL, "amount" numeric(10,2), "payment_date" TIMESTAMP NOT NULL, "confirmed_by" integer, "transaction_reference_number" character varying(255), "account_holder_name" character varying(255), "account_number" character varying(255), "received_amount" numeric(10,2), "is_tds_applicable" boolean NOT NULL DEFAULT false, "tds_amount" numeric(10,2), "tds_percentage" numeric(10,2), "total_payment_recorded" numeric(10,2), "payment_mode" character varying(50) NOT NULL, "payment_status" character varying(50) NOT NULL, "invoice_no" character varying, "quickbooks_id" character varying(255), "quickbooks_sync_token" character varying(50), "last_synced_at" TIMESTAMP, CONSTRAINT "CHK_1ab1e1c08641197203eac54a5d" CHECK (payment_status IN ('Partially Paid', 'Full Payment', 'Overdue', 'Cancelled', 'Refunded')), CONSTRAINT "CHK_e2869176b59401af0c5b173563" CHECK (payment_mode IN ('Bank Transfer', 'Card', 'Cash', 'Cheque')), CONSTRAINT "PK_197ab7af18c93fbb0c9b28b4a59" PRIMARY KEY ("id"))`);
|
|
120
|
+
await queryRunner.query(`CREATE TABLE "core"."quickbooks_connections" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "organization_id" integer, "realm_id" character varying(255) NOT NULL, "access_token" text NOT NULL, "refresh_token" text NOT NULL, "token_expires_at" TIMESTAMP NOT NULL, "scope" jsonb, "is_active" boolean NOT NULL DEFAULT true, "last_sync_at" TIMESTAMP, "company_name" character varying(255), "environment" character varying(50) NOT NULL DEFAULT 'sandbox', CONSTRAINT "UQ_73d8898da57a4f9ea6506a296a8" UNIQUE ("realm_id"), CONSTRAINT "PK_5a1c29eee658ecfff5d18c3b65d" PRIMARY KEY ("id"))`);
|
|
121
|
+
await queryRunner.query(`CREATE TYPE "core"."quickbooks_sync_logs_entity_type_enum" AS ENUM('client', 'invoice', 'payment')`);
|
|
122
|
+
await queryRunner.query(`CREATE TYPE "core"."quickbooks_sync_logs_action_enum" AS ENUM('create', 'update', 'delete')`);
|
|
123
|
+
await queryRunner.query(`CREATE TYPE "core"."quickbooks_sync_logs_direction_enum" AS ENUM('to_qb', 'from_qb')`);
|
|
124
|
+
await queryRunner.query(`CREATE TYPE "core"."quickbooks_sync_logs_status_enum" AS ENUM('pending', 'success', 'failed')`);
|
|
125
|
+
await queryRunner.query(`CREATE TABLE "core"."quickbooks_sync_logs" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "entity_type" "core"."quickbooks_sync_logs_entity_type_enum" NOT NULL, "entity_id" integer NOT NULL, "action" "core"."quickbooks_sync_logs_action_enum" NOT NULL, "direction" "core"."quickbooks_sync_logs_direction_enum" NOT NULL, "status" "core"."quickbooks_sync_logs_status_enum" NOT NULL DEFAULT 'pending', "error_message" text, "retry_count" integer NOT NULL DEFAULT '0', "quickbooks_id" character varying(255), "synced_at" TIMESTAMP, "request_payload" jsonb, "response_payload" jsonb, CONSTRAINT "PK_50ce8d4de2186845dc0f823ab04" PRIMARY KEY ("id"))`);
|
|
126
|
+
await queryRunner.query(`CREATE TABLE "core"."sequence_generator" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "module" character varying(50) NOT NULL, "prefix" character varying(10) NOT NULL, "last_sequence" integer NOT NULL, "year" integer, CONSTRAINT "UQ_6c81eaf35b4a30f2dce6dcdc34e" UNIQUE ("module", "prefix", "year"), CONSTRAINT "PK_414f8c6b901164fa718a998f160" PRIMARY KEY ("id")); COMMENT ON COLUMN "core"."sequence_generator"."module" IS 'Module name (e.g., PROFILE, USER, etc.)'; COMMENT ON COLUMN "core"."sequence_generator"."prefix" IS 'Prefix for the sequence (e.g., PROF)'; COMMENT ON COLUMN "core"."sequence_generator"."last_sequence" IS 'Last used sequence number'; COMMENT ON COLUMN "core"."sequence_generator"."year" IS 'Year for which sequence is being generated (null for non-reset modules)'`);
|
|
127
|
+
await queryRunner.query(`CREATE TABLE "notification"."user_notification_channel" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "email_enabled" boolean NOT NULL DEFAULT true, "push_enabled" boolean NOT NULL DEFAULT true, "whatsapp_enabled" boolean NOT NULL DEFAULT false, CONSTRAINT "UQ_f787eafe0ad689ed02502de59a9" UNIQUE ("user_id"), CONSTRAINT "PK_be9e05f336ebb07993b2fd17d4d" PRIMARY KEY ("id")); COMMENT ON COLUMN "notification"."user_notification_channel"."user_id" IS 'ID of the user'; COMMENT ON COLUMN "notification"."user_notification_channel"."email_enabled" IS 'Global enable/disable for email notifications'; COMMENT ON COLUMN "notification"."user_notification_channel"."push_enabled" IS 'Global enable/disable for push notifications'; COMMENT ON COLUMN "notification"."user_notification_channel"."whatsapp_enabled" IS 'Global enable/disable for WhatsApp notifications'`);
|
|
128
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_f787eafe0ad689ed02502de59a" ON "notification"."user_notification_channel" ("user_id") `);
|
|
129
|
+
await queryRunner.query(`CREATE TYPE "notification"."user_notification_preferences_preference_type_enum" AS ENUM('task_updates', 'approvals_reviews', 'security_alerts', 'billing_payment_updates', 'mentions_comments', 'daily_summary_digest')`);
|
|
130
|
+
await queryRunner.query(`CREATE TABLE "notification"."user_notification_preferences" ("id" SERIAL NOT NULL, "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "created_by" integer, "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_by" integer, "is_deleted" boolean NOT NULL DEFAULT false, "deleted_by" integer, "deleted_at" TIMESTAMP, "user_id" integer NOT NULL, "preference_type" "notification"."user_notification_preferences_preference_type_enum" NOT NULL, "is_enabled" boolean NOT NULL DEFAULT true, "description" text, "metadata" json, CONSTRAINT "PK_2b30dfc697b16f75a55be54d464" PRIMARY KEY ("id")); COMMENT ON COLUMN "notification"."user_notification_preferences"."user_id" IS 'ID of the user'; COMMENT ON COLUMN "notification"."user_notification_preferences"."preference_type" IS 'Type of notification preference'; COMMENT ON COLUMN "notification"."user_notification_preferences"."is_enabled" IS 'Whether this notification type is enabled'; COMMENT ON COLUMN "notification"."user_notification_preferences"."description" IS 'Description of the notification preference'; COMMENT ON COLUMN "notification"."user_notification_preferences"."metadata" IS 'Additional settings for this notification type'`);
|
|
131
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_e9ff68fe973a4e228c5a4f2f35" ON "notification"."user_notification_preferences" ("user_id", "preference_type") `);
|
|
132
|
+
await queryRunner.query(`ALTER TABLE "core"."contacts" ADD CONSTRAINT "FK_8039454fab552403d5579cf7423" FOREIGN KEY ("clientId") REFERENCES "core"."clients"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
133
|
+
await queryRunner.query(`ALTER TABLE "core"."matters_tags" ADD CONSTRAINT "FK_d11c7cea8c462692db0c4ad3add" FOREIGN KEY ("matterId") REFERENCES "core"."matters"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
134
|
+
await queryRunner.query(`ALTER TABLE "core"."matters_tags" ADD CONSTRAINT "FK_985e92af80679b871df4dd80ea5" FOREIGN KEY ("tagId") REFERENCES "core"."tags"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
135
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks_tags" ADD CONSTRAINT "FK_59df4724a06cda41af87120b0ab" FOREIGN KEY ("task_id") REFERENCES "core"."tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
136
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks_tags" ADD CONSTRAINT "FK_3d4e7b193cd9472ca9f5f6aa87f" FOREIGN KEY ("tag_id") REFERENCES "core"."tags"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
137
|
+
await queryRunner.query(`ALTER TABLE "core"."timesheet_summaries" ADD CONSTRAINT "FK_9d3f19cf9e9e30c894d1e0fdb77" FOREIGN KEY ("credit_note_id") REFERENCES "core"."credit_notes"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
138
|
+
await queryRunner.query(`ALTER TABLE "user"."role_permissions" ADD CONSTRAINT "FK_17022daf3f885f7d35423e9971e" FOREIGN KEY ("permission_id") REFERENCES "user"."permissions"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
139
|
+
await queryRunner.query(`ALTER TABLE "user"."role_permissions" ADD CONSTRAINT "FK_178199805b901ccd220ab7740ec" FOREIGN KEY ("role_id") REFERENCES "user"."roles"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
140
|
+
await queryRunner.query(`ALTER TABLE "user"."user_roles" ADD CONSTRAINT "FK_87b8888186ca9769c960e926870" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
141
|
+
await queryRunner.query(`ALTER TABLE "user"."user_roles" ADD CONSTRAINT "FK_b23c65e50a758245a33ee35fda1" FOREIGN KEY ("role_id") REFERENCES "user"."roles"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
142
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_conditions" ADD CONSTRAINT "FK_e8c3348ce1c3f8dcd058b3e42e1" FOREIGN KEY ("approval_hierarchy_id") REFERENCES "user"."approval_hierarchy"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
143
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_hierarchy_users" ADD CONSTRAINT "FK_0d5584adbc9edb7ace919ce3154" FOREIGN KEY ("approval_hierarchy_id") REFERENCES "user"."approval_hierarchy"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
144
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_hierarchy_users" ADD CONSTRAINT "FK_893345452ee7c34e51aee57fdf6" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
145
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_hierarchy_roles" ADD CONSTRAINT "FK_b321bcc21e5bc793edde6bc9036" FOREIGN KEY ("approval_hierarchy_id") REFERENCES "user"."approval_hierarchy"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
146
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_hierarchy_roles" ADD CONSTRAINT "FK_c03d6991c6705e200f41da2ad21" FOREIGN KEY ("role_id") REFERENCES "user"."roles"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
147
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_escalation_users" ADD CONSTRAINT "FK_0d009caeae9ce2ea92c251d9fb7" FOREIGN KEY ("approval_level_escalation_id") REFERENCES "user"."approval_level_escalations"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
148
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_escalation_users" ADD CONSTRAINT "FK_dca238d00ff1f4aa5dd41caad35" FOREIGN KEY ("approver_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
149
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_escalations" ADD CONSTRAINT "FK_555d6d5a51ab679db71ec6957b0" FOREIGN KEY ("approval_level_id") REFERENCES "user"."approval_levels"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
150
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_escalations" ADD CONSTRAINT "FK_b871f9db7a4503f164c8e717719" FOREIGN KEY ("escalation_approver_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
151
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_levels" ADD CONSTRAINT "FK_0bb956a8ceabd846da9edf382e4" FOREIGN KEY ("approval_hierarchy_id") REFERENCES "user"."approval_hierarchy"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
152
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_levels" ADD CONSTRAINT "FK_605c4399f40379eb04acb2c3f1d" FOREIGN KEY ("approval_condition_id") REFERENCES "user"."approval_conditions"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
153
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_users" ADD CONSTRAINT "FK_dedc577fa6bafac1ad3e6d43394" FOREIGN KEY ("approval_level_id") REFERENCES "user"."approval_levels"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
154
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_users" ADD CONSTRAINT "FK_96a6baa2fb7875f088bd2275bfe" FOREIGN KEY ("approver_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
155
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_journey" ADD CONSTRAINT "FK_86a76d552c40edcf8abb55da033" FOREIGN KEY ("approval_hierarchy_id") REFERENCES "user"."approval_hierarchy"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
156
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_journey" ADD CONSTRAINT "FK_517b91033aaa50260f2c041f549" FOREIGN KEY ("requester_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
157
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_journey" ADD CONSTRAINT "FK_e155c39b433a47861d9dc749299" FOREIGN KEY ("approvar_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
158
|
+
await queryRunner.query(`ALTER TABLE "user"."chats" ADD CONSTRAINT "FK_ed49245ae87902459011243d69a" FOREIGN KEY ("sender_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
159
|
+
await queryRunner.query(`ALTER TABLE "user"."chats" ADD CONSTRAINT "FK_543183a92a0aa5ae2851b69913c" FOREIGN KEY ("receiver_id") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
160
|
+
await queryRunner.query(`ALTER TABLE "user"."user_session_history" ADD CONSTRAINT "FK_347fb1c62a0dcc6bb88e0a9e3df" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
161
|
+
await queryRunner.query(`ALTER TABLE "user"."upload_logs" ADD CONSTRAINT "FK_7d124cca0e03ecb612903ed7fa1" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
162
|
+
await queryRunner.query(`ALTER TABLE "user"."ownership_transfers" ADD CONSTRAINT "FK_aa59ffd8fb48f1fcd85b27e7dc8" FOREIGN KEY ("ownership_transfer_from_user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
163
|
+
await queryRunner.query(`ALTER TABLE "user"."ownership_transfers" ADD CONSTRAINT "FK_bf8039d548285d6c60e933f0a7c" FOREIGN KEY ("ownership_transfer_to_user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
164
|
+
await queryRunner.query(`ALTER TABLE "user"."ownership_transfers" ADD CONSTRAINT "FK_05b0567d2e3ca7130ab1d801601" FOREIGN KEY ("transferred_by_user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
165
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."user_shifts" ADD CONSTRAINT "FK_d45e095ef0aa28d21f33e3659d6" FOREIGN KEY ("current_shift_id") REFERENCES "timesheet"."shifts"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
166
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."user_shifts" ADD CONSTRAINT "FK_f20a0425e650f361f4bb9c56727" FOREIGN KEY ("current_alternate_shift_id") REFERENCES "timesheet"."shifts"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
167
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."user_shifts" ADD CONSTRAINT "FK_12404f5d5821512c86c3f981d46" FOREIGN KEY ("planned_shift_id") REFERENCES "timesheet"."shifts"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
168
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."user_shifts" ADD CONSTRAINT "FK_d73716f961b931bd6c4c371f263" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
169
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."role_shifts" ADD CONSTRAINT "FK_ea4f25b213da0dfac34d0c61b9c" FOREIGN KEY ("shift_id") REFERENCES "timesheet"."shifts"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
170
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."shifts" ADD CONSTRAINT "FK_f4e71fdb4bc59e606ef75ead4db" FOREIGN KEY ("created_by") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
171
|
+
await queryRunner.query(`ALTER TABLE "core"."task_comments" ADD CONSTRAINT "FK_278dfadbcb8e9489d08ace2091c" FOREIGN KEY ("sub_task_id") REFERENCES "core"."sub_tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
172
|
+
await queryRunner.query(`ALTER TABLE "core"."task_comments" ADD CONSTRAINT "FK_ba9e465cfc707006e60aae59946" FOREIGN KEY ("task_id") REFERENCES "core"."tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
173
|
+
await queryRunner.query(`ALTER TABLE "core"."task_comments" ADD CONSTRAINT "FK_07ff0d4347a198527663bda63d9" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
174
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks_tags" ADD CONSTRAINT "FK_746c1983ff0817b71ccf4c276ac" FOREIGN KEY ("sub_task_id") REFERENCES "core"."sub_tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
175
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks_tags" ADD CONSTRAINT "FK_bef8e3fb8cabeffcb6785ff1529" FOREIGN KEY ("tag_id") REFERENCES "core"."tags"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
176
|
+
await queryRunner.query(`ALTER TABLE "core"."task_reminders" ADD CONSTRAINT "FK_e4ead86f68b14e41994d5944783" FOREIGN KEY ("task_id") REFERENCES "core"."tasks"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
177
|
+
await queryRunner.query(`ALTER TABLE "core"."task_reminders" ADD CONSTRAINT "FK_d873a7560256ef3fe42e4b25c3b" FOREIGN KEY ("sub_task_id") REFERENCES "core"."sub_tasks"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
178
|
+
await queryRunner.query(`ALTER TABLE "core"."subtask_users" ADD CONSTRAINT "FK_721714d26cf927768b07187e0cc" FOREIGN KEY ("subtask_id") REFERENCES "core"."sub_tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
179
|
+
await queryRunner.query(`ALTER TABLE "core"."subtask_users" ADD CONSTRAINT "FK_cd29889d701a180561283ee725d" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
180
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" ADD CONSTRAINT "FK_28516b926293e307e2a990a8244" FOREIGN KEY ("matter_id") REFERENCES "core"."matters"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
181
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" ADD CONSTRAINT "FK_0b3ef9c46b04cedaad411a88a4c" FOREIGN KEY ("assigned_to") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
182
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" ADD CONSTRAINT "FK_be4002db4cc6e2d20577f48ddf3" FOREIGN KEY ("task_id") REFERENCES "core"."tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
183
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" ADD CONSTRAINT "FK_98e65836acff62aeb041322cf15" FOREIGN KEY ("task_type_id") REFERENCES "core"."task_types"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
184
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" ADD CONSTRAINT "FK_db45304e90df0349ce2f32af333" FOREIGN KEY ("milestone_id") REFERENCES "core"."task_milestones"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
185
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" ADD CONSTRAINT "FK_7a64358df407a4c5b44a5651321" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
186
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" ADD CONSTRAINT "FK_db819ecb681404ccbd608033517" FOREIGN KEY ("matter_id") REFERENCES "core"."matters"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
187
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" ADD CONSTRAINT "FK_1b9c507edbd1c59a863f92dc44d" FOREIGN KEY ("timesheet_id") REFERENCES "timesheet"."timesheets"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
188
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" ADD CONSTRAINT "FK_48b480e9ff524b2ffc98e57b269" FOREIGN KEY ("task_id") REFERENCES "core"."tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
189
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" ADD CONSTRAINT "FK_4e233d68c58109fd639c50acc59" FOREIGN KEY ("subtask_id") REFERENCES "core"."sub_tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
190
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet_comments" ADD CONSTRAINT "FK_a24332a77efb96cfb810f89d28c" FOREIGN KEY ("timesheet_id") REFERENCES "timesheet"."timesheets"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
191
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet_comments" ADD CONSTRAINT "FK_5e22a5f6bf3b8ae79cc026d432b" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
192
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheets" ADD CONSTRAINT "FK_e87f4a4a85cb9932938c695a692" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
193
|
+
await queryRunner.query(`ALTER TABLE "core"."task_users" ADD CONSTRAINT "FK_9c63da49b3431962bb3947ee090" FOREIGN KEY ("task_id") REFERENCES "core"."tasks"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
194
|
+
await queryRunner.query(`ALTER TABLE "core"."task_users" ADD CONSTRAINT "FK_64ad749620fd2971c294c483d7f" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
195
|
+
await queryRunner.query(`ALTER TABLE "core"."matter_team_members" ADD CONSTRAINT "FK_a0a803586c5e266d827adc8f35b" FOREIGN KEY ("matter_id") REFERENCES "core"."matters"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
196
|
+
await queryRunner.query(`ALTER TABLE "core"."matter_team_members" ADD CONSTRAINT "FK_074ae7e78cea94ea7cde4a4cae9" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
197
|
+
await queryRunner.query(`ALTER TABLE "core"."superset" ADD CONSTRAINT "FK_7ef0ae2161533f36a96f205109d" FOREIGN KEY ("created_by") REFERENCES "user"."users"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
198
|
+
await queryRunner.query(`ALTER TABLE "user"."users" ADD CONSTRAINT "FK_0921d1972cf861d568f5271cd85" FOREIGN KEY ("department_id") REFERENCES "user"."departments"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
199
|
+
await queryRunner.query(`ALTER TABLE "core"."expenses" ADD CONSTRAINT "FK_1b05d45e3fe7715b773b8e3b446" FOREIGN KEY ("requester_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
200
|
+
await queryRunner.query(`ALTER TABLE "core"."expenses" ADD CONSTRAINT "FK_1781ca6f69623bdd11594f03ec4" FOREIGN KEY ("matter_id") REFERENCES "core"."matters"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
201
|
+
await queryRunner.query(`ALTER TABLE "core"."expenses" ADD CONSTRAINT "FK_4ed4123302e4f0be134726aa048" FOREIGN KEY ("credit_note_id") REFERENCES "core"."credit_notes"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
202
|
+
await queryRunner.query(`ALTER TABLE "core"."invoice_items" ADD CONSTRAINT "FK_cc6188f190db8410ecf58c66386" FOREIGN KEY ("credit_note_id") REFERENCES "core"."credit_notes"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
203
|
+
await queryRunner.query(`ALTER TABLE "core"."invoice_items" ADD CONSTRAINT "FK_dc991d555664682cfe892eea2c1" FOREIGN KEY ("invoice_id") REFERENCES "core"."invoices"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
204
|
+
await queryRunner.query(`ALTER TABLE "core"."credit_notes" ADD CONSTRAINT "FK_7681201cc79613a1288de1ae706" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
205
|
+
await queryRunner.query(`ALTER TABLE "core"."credit_notes" ADD CONSTRAINT "FK_ab75ae7ceab2ad0e3c77768c373" FOREIGN KEY ("invoice_id") REFERENCES "core"."invoices"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
206
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" ADD CONSTRAINT "FK_098d5dc60db0e81221cc768141d" FOREIGN KEY ("matter_id") REFERENCES "core"."matters"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
207
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" ADD CONSTRAINT "FK_5770b28d72ca90c43b1381bf787" FOREIGN KEY ("assigned_to") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
208
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" ADD CONSTRAINT "FK_ea76a982cfc3dd4bff34daaf036" FOREIGN KEY ("task_type_id") REFERENCES "core"."task_types"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
209
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" ADD CONSTRAINT "FK_39abeb50240a7312a00786c9b24" FOREIGN KEY ("milestone_id") REFERENCES "core"."task_milestones"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
210
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" ADD CONSTRAINT "FK_01be58a62aa2adba036a022d773" FOREIGN KEY ("credit_note_id") REFERENCES "core"."credit_notes"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
211
|
+
await queryRunner.query(`ALTER TABLE "core"."template_tasks" ADD CONSTRAINT "FK_f337179607024feefe9f2ed4b98" FOREIGN KEY ("template_id") REFERENCES "core"."templates"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
212
|
+
await queryRunner.query(`ALTER TABLE "core"."matters" ADD CONSTRAINT "FK_5687efd92bd1f965eaa0e8c4bcc" FOREIGN KEY ("userId") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
213
|
+
await queryRunner.query(`ALTER TABLE "core"."matters" ADD CONSTRAINT "FK_01485a46141fcfa55fd498f8d06" FOREIGN KEY ("client_id") REFERENCES "core"."clients"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
214
|
+
await queryRunner.query(`ALTER TABLE "core"."matters" ADD CONSTRAINT "FK_8ac009dcc8c40d20de521574801" FOREIGN KEY ("templateId") REFERENCES "core"."templates"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
215
|
+
await queryRunner.query(`ALTER TABLE "core"."matters" ADD CONSTRAINT "FK_91232dedf5152ad5748a97c09ba" FOREIGN KEY ("currency_id") REFERENCES "core"."currencies"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
216
|
+
await queryRunner.query(`ALTER TABLE "core"."invoices" ADD CONSTRAINT "FK_418bb8a3394c206c7f241801644" FOREIGN KEY ("matter_id") REFERENCES "core"."matters"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
217
|
+
await queryRunner.query(`ALTER TABLE "core"."invoices" ADD CONSTRAINT "FK_5534ba11e10f1a9953cbdaabf16" FOREIGN KEY ("client_id") REFERENCES "core"."clients"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
218
|
+
await queryRunner.query(`ALTER TABLE "core"."invoices" ADD CONSTRAINT "FK_66e2b17370ed9af2205ce558095" FOREIGN KEY ("approved_by") REFERENCES "user"."users"("id") ON DELETE SET NULL ON UPDATE CASCADE`);
|
|
219
|
+
await queryRunner.query(`ALTER TABLE "core"."invoices" ADD CONSTRAINT "FK_4a3e11bc54fb1cc2586f1d44a94" FOREIGN KEY ("approval_requested_by") REFERENCES "user"."users"("id") ON DELETE SET NULL ON UPDATE CASCADE`);
|
|
220
|
+
await queryRunner.query(`ALTER TABLE "core"."clients" ADD CONSTRAINT "FK_7a10e2319a4565e0308dd1d369c" FOREIGN KEY ("group_id") REFERENCES "core"."groups"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
221
|
+
await queryRunner.query(`ALTER TABLE "core"."addresses" ADD CONSTRAINT "FK_ae1b6a2290ac79ac41dff9aa574" FOREIGN KEY ("clientId") REFERENCES "core"."clients"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
222
|
+
await queryRunner.query(`ALTER TABLE "core"."cities" ADD CONSTRAINT "FK_4aa0d9a52c36ff93415934e2d2b" FOREIGN KEY ("country_id") REFERENCES "core"."countries"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
223
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_balances" ADD CONSTRAINT "FK_89ffc3253557b60d4d979ffe50c" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
224
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_balances" ADD CONSTRAINT "FK_d64da0a991d2f4d23d86031530c" FOREIGN KEY ("leave_type_id") REFERENCES "user"."leave_types"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
225
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_balances" ADD CONSTRAINT "FK_14e6dfc65cb4a27a2380ade3e68" FOREIGN KEY ("entitlement_id") REFERENCES "user"."entitlements"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
226
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_requests" ADD CONSTRAINT "FK_6d320737541c7c4d2a6f0f9d911" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
227
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_requests" ADD CONSTRAINT "FK_54a57db316598806786c2b95323" FOREIGN KEY ("leave_type_id") REFERENCES "user"."leave_types"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
228
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_requests" ADD CONSTRAINT "FK_271c2b59b16139f902af87326d8" FOREIGN KEY ("leave_balance_id") REFERENCES "user"."leave_balances"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
229
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_requests" ADD CONSTRAINT "FK_c46c950aa343c4598ed7042c1b7" FOREIGN KEY ("approver_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
230
|
+
await queryRunner.query(`ALTER TABLE "user"."entitlements" ADD CONSTRAINT "FK_30d2208c43f245217c03cb7ce31" FOREIGN KEY ("user_id") REFERENCES "user"."users"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
231
|
+
await queryRunner.query(`ALTER TABLE "user"."entitlements" ADD CONSTRAINT "FK_dd5a26c16c32c5c70a368f89ba8" FOREIGN KEY ("leave_type_id") REFERENCES "user"."leave_types"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
232
|
+
await queryRunner.query(`ALTER TABLE "core"."fixed_invoice_items" ADD CONSTRAINT "FK_a18efc039f38be1efb780bdfc06" FOREIGN KEY ("invoice_id") REFERENCES "core"."invoices"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
233
|
+
await queryRunner.query(`ALTER TABLE "core"."user_invoice_template_table" ADD CONSTRAINT "FK_579a059a39a8dbf35b7740fd75f" FOREIGN KEY ("invoice_template_id") REFERENCES "core"."user_invoice_templates"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
234
|
+
await queryRunner.query(`ALTER TABLE "core"."user_invoice_template_header" ADD CONSTRAINT "FK_c334b7c36b38d6ae1154c1c9ad7" FOREIGN KEY ("invoice_template_id") REFERENCES "core"."user_invoice_templates"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
235
|
+
await queryRunner.query(`ALTER TABLE "core"."user_invoice_template_footer" ADD CONSTRAINT "FK_f98f17ab7e0ce6f51c0e79b4b79" FOREIGN KEY ("invoice_template_id") REFERENCES "core"."user_invoice_templates"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
236
|
+
await queryRunner.query(`ALTER TABLE "core"."payments" ADD CONSTRAINT "FK_198183e67e58c2b0790434569d7" FOREIGN KEY ("confirmed_by") REFERENCES "user"."users"("id") ON DELETE SET NULL ON UPDATE CASCADE`);
|
|
237
|
+
await queryRunner.query(`ALTER TABLE "core"."payments" ADD CONSTRAINT "FK_563a5e248518c623eebd987d43e" FOREIGN KEY ("invoice_id") REFERENCES "core"."invoices"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
238
|
+
}
|
|
239
|
+
async down(queryRunner) {
|
|
240
|
+
await queryRunner.query(`ALTER TABLE "core"."payments" DROP CONSTRAINT "FK_563a5e248518c623eebd987d43e"`);
|
|
241
|
+
await queryRunner.query(`ALTER TABLE "core"."payments" DROP CONSTRAINT "FK_198183e67e58c2b0790434569d7"`);
|
|
242
|
+
await queryRunner.query(`ALTER TABLE "core"."user_invoice_template_footer" DROP CONSTRAINT "FK_f98f17ab7e0ce6f51c0e79b4b79"`);
|
|
243
|
+
await queryRunner.query(`ALTER TABLE "core"."user_invoice_template_header" DROP CONSTRAINT "FK_c334b7c36b38d6ae1154c1c9ad7"`);
|
|
244
|
+
await queryRunner.query(`ALTER TABLE "core"."user_invoice_template_table" DROP CONSTRAINT "FK_579a059a39a8dbf35b7740fd75f"`);
|
|
245
|
+
await queryRunner.query(`ALTER TABLE "core"."fixed_invoice_items" DROP CONSTRAINT "FK_a18efc039f38be1efb780bdfc06"`);
|
|
246
|
+
await queryRunner.query(`ALTER TABLE "user"."entitlements" DROP CONSTRAINT "FK_dd5a26c16c32c5c70a368f89ba8"`);
|
|
247
|
+
await queryRunner.query(`ALTER TABLE "user"."entitlements" DROP CONSTRAINT "FK_30d2208c43f245217c03cb7ce31"`);
|
|
248
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_requests" DROP CONSTRAINT "FK_c46c950aa343c4598ed7042c1b7"`);
|
|
249
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_requests" DROP CONSTRAINT "FK_271c2b59b16139f902af87326d8"`);
|
|
250
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_requests" DROP CONSTRAINT "FK_54a57db316598806786c2b95323"`);
|
|
251
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_requests" DROP CONSTRAINT "FK_6d320737541c7c4d2a6f0f9d911"`);
|
|
252
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_balances" DROP CONSTRAINT "FK_14e6dfc65cb4a27a2380ade3e68"`);
|
|
253
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_balances" DROP CONSTRAINT "FK_d64da0a991d2f4d23d86031530c"`);
|
|
254
|
+
await queryRunner.query(`ALTER TABLE "user"."leave_balances" DROP CONSTRAINT "FK_89ffc3253557b60d4d979ffe50c"`);
|
|
255
|
+
await queryRunner.query(`ALTER TABLE "core"."cities" DROP CONSTRAINT "FK_4aa0d9a52c36ff93415934e2d2b"`);
|
|
256
|
+
await queryRunner.query(`ALTER TABLE "core"."addresses" DROP CONSTRAINT "FK_ae1b6a2290ac79ac41dff9aa574"`);
|
|
257
|
+
await queryRunner.query(`ALTER TABLE "core"."clients" DROP CONSTRAINT "FK_7a10e2319a4565e0308dd1d369c"`);
|
|
258
|
+
await queryRunner.query(`ALTER TABLE "core"."invoices" DROP CONSTRAINT "FK_4a3e11bc54fb1cc2586f1d44a94"`);
|
|
259
|
+
await queryRunner.query(`ALTER TABLE "core"."invoices" DROP CONSTRAINT "FK_66e2b17370ed9af2205ce558095"`);
|
|
260
|
+
await queryRunner.query(`ALTER TABLE "core"."invoices" DROP CONSTRAINT "FK_5534ba11e10f1a9953cbdaabf16"`);
|
|
261
|
+
await queryRunner.query(`ALTER TABLE "core"."invoices" DROP CONSTRAINT "FK_418bb8a3394c206c7f241801644"`);
|
|
262
|
+
await queryRunner.query(`ALTER TABLE "core"."matters" DROP CONSTRAINT "FK_91232dedf5152ad5748a97c09ba"`);
|
|
263
|
+
await queryRunner.query(`ALTER TABLE "core"."matters" DROP CONSTRAINT "FK_8ac009dcc8c40d20de521574801"`);
|
|
264
|
+
await queryRunner.query(`ALTER TABLE "core"."matters" DROP CONSTRAINT "FK_01485a46141fcfa55fd498f8d06"`);
|
|
265
|
+
await queryRunner.query(`ALTER TABLE "core"."matters" DROP CONSTRAINT "FK_5687efd92bd1f965eaa0e8c4bcc"`);
|
|
266
|
+
await queryRunner.query(`ALTER TABLE "core"."template_tasks" DROP CONSTRAINT "FK_f337179607024feefe9f2ed4b98"`);
|
|
267
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" DROP CONSTRAINT "FK_01be58a62aa2adba036a022d773"`);
|
|
268
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" DROP CONSTRAINT "FK_39abeb50240a7312a00786c9b24"`);
|
|
269
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" DROP CONSTRAINT "FK_ea76a982cfc3dd4bff34daaf036"`);
|
|
270
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" DROP CONSTRAINT "FK_5770b28d72ca90c43b1381bf787"`);
|
|
271
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks" DROP CONSTRAINT "FK_098d5dc60db0e81221cc768141d"`);
|
|
272
|
+
await queryRunner.query(`ALTER TABLE "core"."credit_notes" DROP CONSTRAINT "FK_ab75ae7ceab2ad0e3c77768c373"`);
|
|
273
|
+
await queryRunner.query(`ALTER TABLE "core"."credit_notes" DROP CONSTRAINT "FK_7681201cc79613a1288de1ae706"`);
|
|
274
|
+
await queryRunner.query(`ALTER TABLE "core"."invoice_items" DROP CONSTRAINT "FK_dc991d555664682cfe892eea2c1"`);
|
|
275
|
+
await queryRunner.query(`ALTER TABLE "core"."invoice_items" DROP CONSTRAINT "FK_cc6188f190db8410ecf58c66386"`);
|
|
276
|
+
await queryRunner.query(`ALTER TABLE "core"."expenses" DROP CONSTRAINT "FK_4ed4123302e4f0be134726aa048"`);
|
|
277
|
+
await queryRunner.query(`ALTER TABLE "core"."expenses" DROP CONSTRAINT "FK_1781ca6f69623bdd11594f03ec4"`);
|
|
278
|
+
await queryRunner.query(`ALTER TABLE "core"."expenses" DROP CONSTRAINT "FK_1b05d45e3fe7715b773b8e3b446"`);
|
|
279
|
+
await queryRunner.query(`ALTER TABLE "user"."users" DROP CONSTRAINT "FK_0921d1972cf861d568f5271cd85"`);
|
|
280
|
+
await queryRunner.query(`ALTER TABLE "core"."superset" DROP CONSTRAINT "FK_7ef0ae2161533f36a96f205109d"`);
|
|
281
|
+
await queryRunner.query(`ALTER TABLE "core"."matter_team_members" DROP CONSTRAINT "FK_074ae7e78cea94ea7cde4a4cae9"`);
|
|
282
|
+
await queryRunner.query(`ALTER TABLE "core"."matter_team_members" DROP CONSTRAINT "FK_a0a803586c5e266d827adc8f35b"`);
|
|
283
|
+
await queryRunner.query(`ALTER TABLE "core"."task_users" DROP CONSTRAINT "FK_64ad749620fd2971c294c483d7f"`);
|
|
284
|
+
await queryRunner.query(`ALTER TABLE "core"."task_users" DROP CONSTRAINT "FK_9c63da49b3431962bb3947ee090"`);
|
|
285
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheets" DROP CONSTRAINT "FK_e87f4a4a85cb9932938c695a692"`);
|
|
286
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet_comments" DROP CONSTRAINT "FK_5e22a5f6bf3b8ae79cc026d432b"`);
|
|
287
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet_comments" DROP CONSTRAINT "FK_a24332a77efb96cfb810f89d28c"`);
|
|
288
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" DROP CONSTRAINT "FK_4e233d68c58109fd639c50acc59"`);
|
|
289
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" DROP CONSTRAINT "FK_48b480e9ff524b2ffc98e57b269"`);
|
|
290
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" DROP CONSTRAINT "FK_1b9c507edbd1c59a863f92dc44d"`);
|
|
291
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" DROP CONSTRAINT "FK_db819ecb681404ccbd608033517"`);
|
|
292
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."timesheet-events" DROP CONSTRAINT "FK_7a64358df407a4c5b44a5651321"`);
|
|
293
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" DROP CONSTRAINT "FK_db45304e90df0349ce2f32af333"`);
|
|
294
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" DROP CONSTRAINT "FK_98e65836acff62aeb041322cf15"`);
|
|
295
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" DROP CONSTRAINT "FK_be4002db4cc6e2d20577f48ddf3"`);
|
|
296
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" DROP CONSTRAINT "FK_0b3ef9c46b04cedaad411a88a4c"`);
|
|
297
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks" DROP CONSTRAINT "FK_28516b926293e307e2a990a8244"`);
|
|
298
|
+
await queryRunner.query(`ALTER TABLE "core"."subtask_users" DROP CONSTRAINT "FK_cd29889d701a180561283ee725d"`);
|
|
299
|
+
await queryRunner.query(`ALTER TABLE "core"."subtask_users" DROP CONSTRAINT "FK_721714d26cf927768b07187e0cc"`);
|
|
300
|
+
await queryRunner.query(`ALTER TABLE "core"."task_reminders" DROP CONSTRAINT "FK_d873a7560256ef3fe42e4b25c3b"`);
|
|
301
|
+
await queryRunner.query(`ALTER TABLE "core"."task_reminders" DROP CONSTRAINT "FK_e4ead86f68b14e41994d5944783"`);
|
|
302
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks_tags" DROP CONSTRAINT "FK_bef8e3fb8cabeffcb6785ff1529"`);
|
|
303
|
+
await queryRunner.query(`ALTER TABLE "core"."sub_tasks_tags" DROP CONSTRAINT "FK_746c1983ff0817b71ccf4c276ac"`);
|
|
304
|
+
await queryRunner.query(`ALTER TABLE "core"."task_comments" DROP CONSTRAINT "FK_07ff0d4347a198527663bda63d9"`);
|
|
305
|
+
await queryRunner.query(`ALTER TABLE "core"."task_comments" DROP CONSTRAINT "FK_ba9e465cfc707006e60aae59946"`);
|
|
306
|
+
await queryRunner.query(`ALTER TABLE "core"."task_comments" DROP CONSTRAINT "FK_278dfadbcb8e9489d08ace2091c"`);
|
|
307
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."shifts" DROP CONSTRAINT "FK_f4e71fdb4bc59e606ef75ead4db"`);
|
|
308
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."role_shifts" DROP CONSTRAINT "FK_ea4f25b213da0dfac34d0c61b9c"`);
|
|
309
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."user_shifts" DROP CONSTRAINT "FK_d73716f961b931bd6c4c371f263"`);
|
|
310
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."user_shifts" DROP CONSTRAINT "FK_12404f5d5821512c86c3f981d46"`);
|
|
311
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."user_shifts" DROP CONSTRAINT "FK_f20a0425e650f361f4bb9c56727"`);
|
|
312
|
+
await queryRunner.query(`ALTER TABLE "timesheet"."user_shifts" DROP CONSTRAINT "FK_d45e095ef0aa28d21f33e3659d6"`);
|
|
313
|
+
await queryRunner.query(`ALTER TABLE "user"."ownership_transfers" DROP CONSTRAINT "FK_05b0567d2e3ca7130ab1d801601"`);
|
|
314
|
+
await queryRunner.query(`ALTER TABLE "user"."ownership_transfers" DROP CONSTRAINT "FK_bf8039d548285d6c60e933f0a7c"`);
|
|
315
|
+
await queryRunner.query(`ALTER TABLE "user"."ownership_transfers" DROP CONSTRAINT "FK_aa59ffd8fb48f1fcd85b27e7dc8"`);
|
|
316
|
+
await queryRunner.query(`ALTER TABLE "user"."upload_logs" DROP CONSTRAINT "FK_7d124cca0e03ecb612903ed7fa1"`);
|
|
317
|
+
await queryRunner.query(`ALTER TABLE "user"."user_session_history" DROP CONSTRAINT "FK_347fb1c62a0dcc6bb88e0a9e3df"`);
|
|
318
|
+
await queryRunner.query(`ALTER TABLE "user"."chats" DROP CONSTRAINT "FK_543183a92a0aa5ae2851b69913c"`);
|
|
319
|
+
await queryRunner.query(`ALTER TABLE "user"."chats" DROP CONSTRAINT "FK_ed49245ae87902459011243d69a"`);
|
|
320
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_journey" DROP CONSTRAINT "FK_e155c39b433a47861d9dc749299"`);
|
|
321
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_journey" DROP CONSTRAINT "FK_517b91033aaa50260f2c041f549"`);
|
|
322
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_journey" DROP CONSTRAINT "FK_86a76d552c40edcf8abb55da033"`);
|
|
323
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_users" DROP CONSTRAINT "FK_96a6baa2fb7875f088bd2275bfe"`);
|
|
324
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_users" DROP CONSTRAINT "FK_dedc577fa6bafac1ad3e6d43394"`);
|
|
325
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_levels" DROP CONSTRAINT "FK_605c4399f40379eb04acb2c3f1d"`);
|
|
326
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_levels" DROP CONSTRAINT "FK_0bb956a8ceabd846da9edf382e4"`);
|
|
327
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_escalations" DROP CONSTRAINT "FK_b871f9db7a4503f164c8e717719"`);
|
|
328
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_escalations" DROP CONSTRAINT "FK_555d6d5a51ab679db71ec6957b0"`);
|
|
329
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_escalation_users" DROP CONSTRAINT "FK_dca238d00ff1f4aa5dd41caad35"`);
|
|
330
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_level_escalation_users" DROP CONSTRAINT "FK_0d009caeae9ce2ea92c251d9fb7"`);
|
|
331
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_hierarchy_roles" DROP CONSTRAINT "FK_c03d6991c6705e200f41da2ad21"`);
|
|
332
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_hierarchy_roles" DROP CONSTRAINT "FK_b321bcc21e5bc793edde6bc9036"`);
|
|
333
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_hierarchy_users" DROP CONSTRAINT "FK_893345452ee7c34e51aee57fdf6"`);
|
|
334
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_hierarchy_users" DROP CONSTRAINT "FK_0d5584adbc9edb7ace919ce3154"`);
|
|
335
|
+
await queryRunner.query(`ALTER TABLE "user"."approval_conditions" DROP CONSTRAINT "FK_e8c3348ce1c3f8dcd058b3e42e1"`);
|
|
336
|
+
await queryRunner.query(`ALTER TABLE "user"."user_roles" DROP CONSTRAINT "FK_b23c65e50a758245a33ee35fda1"`);
|
|
337
|
+
await queryRunner.query(`ALTER TABLE "user"."user_roles" DROP CONSTRAINT "FK_87b8888186ca9769c960e926870"`);
|
|
338
|
+
await queryRunner.query(`ALTER TABLE "user"."role_permissions" DROP CONSTRAINT "FK_178199805b901ccd220ab7740ec"`);
|
|
339
|
+
await queryRunner.query(`ALTER TABLE "user"."role_permissions" DROP CONSTRAINT "FK_17022daf3f885f7d35423e9971e"`);
|
|
340
|
+
await queryRunner.query(`ALTER TABLE "core"."timesheet_summaries" DROP CONSTRAINT "FK_9d3f19cf9e9e30c894d1e0fdb77"`);
|
|
341
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks_tags" DROP CONSTRAINT "FK_3d4e7b193cd9472ca9f5f6aa87f"`);
|
|
342
|
+
await queryRunner.query(`ALTER TABLE "core"."tasks_tags" DROP CONSTRAINT "FK_59df4724a06cda41af87120b0ab"`);
|
|
343
|
+
await queryRunner.query(`ALTER TABLE "core"."matters_tags" DROP CONSTRAINT "FK_985e92af80679b871df4dd80ea5"`);
|
|
344
|
+
await queryRunner.query(`ALTER TABLE "core"."matters_tags" DROP CONSTRAINT "FK_d11c7cea8c462692db0c4ad3add"`);
|
|
345
|
+
await queryRunner.query(`ALTER TABLE "core"."contacts" DROP CONSTRAINT "FK_8039454fab552403d5579cf7423"`);
|
|
346
|
+
await queryRunner.query(`DROP INDEX "notification"."IDX_e9ff68fe973a4e228c5a4f2f35"`);
|
|
347
|
+
await queryRunner.query(`DROP TABLE "notification"."user_notification_preferences"`);
|
|
348
|
+
await queryRunner.query(`DROP TYPE "notification"."user_notification_preferences_preference_type_enum"`);
|
|
349
|
+
await queryRunner.query(`DROP INDEX "notification"."IDX_f787eafe0ad689ed02502de59a"`);
|
|
350
|
+
await queryRunner.query(`DROP TABLE "notification"."user_notification_channel"`);
|
|
351
|
+
await queryRunner.query(`DROP TABLE "core"."sequence_generator"`);
|
|
352
|
+
await queryRunner.query(`DROP TABLE "core"."quickbooks_sync_logs"`);
|
|
353
|
+
await queryRunner.query(`DROP TYPE "core"."quickbooks_sync_logs_status_enum"`);
|
|
354
|
+
await queryRunner.query(`DROP TYPE "core"."quickbooks_sync_logs_direction_enum"`);
|
|
355
|
+
await queryRunner.query(`DROP TYPE "core"."quickbooks_sync_logs_action_enum"`);
|
|
356
|
+
await queryRunner.query(`DROP TYPE "core"."quickbooks_sync_logs_entity_type_enum"`);
|
|
357
|
+
await queryRunner.query(`DROP TABLE "core"."quickbooks_connections"`);
|
|
358
|
+
await queryRunner.query(`DROP TABLE "core"."payments"`);
|
|
359
|
+
await queryRunner.query(`DROP INDEX "core"."IDX_bffd2af546d0f5eb967492c2ad"`);
|
|
360
|
+
await queryRunner.query(`DROP TABLE "core"."matter_task_view_filters"`);
|
|
361
|
+
await queryRunner.query(`DROP TABLE "core"."user_invoice_templates"`);
|
|
362
|
+
await queryRunner.query(`DROP TYPE "core"."user_invoice_templates_status_enum"`);
|
|
363
|
+
await queryRunner.query(`DROP TYPE "core"."user_invoice_templates_origination_enum"`);
|
|
364
|
+
await queryRunner.query(`DROP TYPE "core"."user_invoice_templates_paper_size_enum"`);
|
|
365
|
+
await queryRunner.query(`DROP TABLE "core"."user_invoice_template_footer"`);
|
|
366
|
+
await queryRunner.query(`DROP TABLE "core"."user_invoice_template_header"`);
|
|
367
|
+
await queryRunner.query(`DROP TABLE "core"."user_invoice_template_table"`);
|
|
368
|
+
await queryRunner.query(`DROP TYPE "core"."user_invoice_template_table_tds_type_enum"`);
|
|
369
|
+
await queryRunner.query(`DROP TYPE "core"."user_invoice_template_table_gst_type_enum"`);
|
|
370
|
+
await queryRunner.query(`DROP TABLE "timesheet"."holidays"`);
|
|
371
|
+
await queryRunner.query(`DROP INDEX "user"."idx_gst_number"`);
|
|
372
|
+
await queryRunner.query(`DROP TABLE "user"."gst"`);
|
|
373
|
+
await queryRunner.query(`DROP INDEX "core"."idx_fixed_invoice_items_invoice_id"`);
|
|
374
|
+
await queryRunner.query(`DROP TABLE "core"."fixed_invoice_items"`);
|
|
375
|
+
await queryRunner.query(`DROP TABLE "user"."file_data"`);
|
|
376
|
+
await queryRunner.query(`DROP TABLE "user"."entitlements"`);
|
|
377
|
+
await queryRunner.query(`DROP TYPE "user"."entitlements_entitlement_type_enum"`);
|
|
378
|
+
await queryRunner.query(`DROP TABLE "user"."leave_types"`);
|
|
379
|
+
await queryRunner.query(`DROP TABLE "user"."leave_requests"`);
|
|
380
|
+
await queryRunner.query(`DROP TYPE "user"."leave_requests_approval_flow_type_enum"`);
|
|
381
|
+
await queryRunner.query(`DROP TYPE "user"."leave_requests_half_day_position_enum"`);
|
|
382
|
+
await queryRunner.query(`DROP TYPE "user"."leave_requests_status_enum"`);
|
|
383
|
+
await queryRunner.query(`DROP TYPE "user"."leave_requests_days_type_enum"`);
|
|
384
|
+
await queryRunner.query(`DROP TYPE "user"."leave_requests_end_date_type_enum"`);
|
|
385
|
+
await queryRunner.query(`DROP TYPE "user"."leave_requests_start_date_type_enum"`);
|
|
386
|
+
await queryRunner.query(`DROP INDEX "user"."IDX_dc1ba65e369fbfe829ec3acb7c"`);
|
|
387
|
+
await queryRunner.query(`DROP TABLE "user"."leave_balances"`);
|
|
388
|
+
await queryRunner.query(`DROP TYPE "user"."leave_balances_credit_frequency_enum"`);
|
|
389
|
+
await queryRunner.query(`DROP TABLE "core"."cities"`);
|
|
390
|
+
await queryRunner.query(`DROP TABLE "core"."countries"`);
|
|
391
|
+
await queryRunner.query(`DROP TABLE "notification"."alerts"`);
|
|
392
|
+
await queryRunner.query(`DROP TYPE "notification"."alerts_status_enum"`);
|
|
393
|
+
await queryRunner.query(`DROP TYPE "notification"."alerts_priority_enum"`);
|
|
394
|
+
await queryRunner.query(`DROP TYPE "notification"."alerts_type_enum"`);
|
|
395
|
+
await queryRunner.query(`DROP TABLE "core"."addresses"`);
|
|
396
|
+
await queryRunner.query(`DROP TABLE "core"."clients"`);
|
|
397
|
+
await queryRunner.query(`DROP TYPE "core"."clients_engagement_type_enum"`);
|
|
398
|
+
await queryRunner.query(`DROP TYPE "core"."clients_status_enum"`);
|
|
399
|
+
await queryRunner.query(`DROP TYPE "core"."clients_client_type_enum"`);
|
|
400
|
+
await queryRunner.query(`DROP INDEX "core"."idx_invoices_matter_id"`);
|
|
401
|
+
await queryRunner.query(`DROP INDEX "core"."idx_invoices_client_id"`);
|
|
402
|
+
await queryRunner.query(`DROP INDEX "core"."idx_invoices_status"`);
|
|
403
|
+
await queryRunner.query(`DROP TABLE "core"."invoices"`);
|
|
404
|
+
await queryRunner.query(`DROP TYPE "core"."invoices_invoice_type_enum"`);
|
|
405
|
+
await queryRunner.query(`DROP TABLE "core"."matters"`);
|
|
406
|
+
await queryRunner.query(`DROP TABLE "core"."currencies"`);
|
|
407
|
+
await queryRunner.query(`DROP TABLE "core"."templates"`);
|
|
408
|
+
await queryRunner.query(`DROP TABLE "core"."template_tasks"`);
|
|
409
|
+
await queryRunner.query(`DROP TABLE "core"."tasks"`);
|
|
410
|
+
await queryRunner.query(`DROP TYPE "core"."tasks_sourcetype_enum"`);
|
|
411
|
+
await queryRunner.query(`DROP TABLE "core"."credit_notes"`);
|
|
412
|
+
await queryRunner.query(`DROP TYPE "core"."credit_notes_status_enum"`);
|
|
413
|
+
await queryRunner.query(`DROP INDEX "core"."idx_invoice_items_invoice_id"`);
|
|
414
|
+
await queryRunner.query(`DROP INDEX "core"."idx_invoice_items_item"`);
|
|
415
|
+
await queryRunner.query(`DROP TABLE "core"."invoice_items"`);
|
|
416
|
+
await queryRunner.query(`DROP TYPE "core"."invoice_items_item_type_enum"`);
|
|
417
|
+
await queryRunner.query(`DROP TABLE "core"."expenses"`);
|
|
418
|
+
await queryRunner.query(`DROP TABLE "user"."users"`);
|
|
419
|
+
await queryRunner.query(`DROP TABLE "core"."superset"`);
|
|
420
|
+
await queryRunner.query(`DROP TABLE "core"."matter_team_members"`);
|
|
421
|
+
await queryRunner.query(`DROP TABLE "core"."task_users"`);
|
|
422
|
+
await queryRunner.query(`DROP TABLE "timesheet"."timesheets"`);
|
|
423
|
+
await queryRunner.query(`DROP TYPE "timesheet"."timesheets_approval_flow_type_enum"`);
|
|
424
|
+
await queryRunner.query(`DROP TABLE "timesheet"."timesheet_comments"`);
|
|
425
|
+
await queryRunner.query(`DROP TABLE "timesheet"."timesheet-events"`);
|
|
426
|
+
await queryRunner.query(`DROP TYPE "timesheet"."timesheet-events_task_type_enum"`);
|
|
427
|
+
await queryRunner.query(`DROP TABLE "core"."sub_tasks"`);
|
|
428
|
+
await queryRunner.query(`DROP TABLE "core"."task_milestones"`);
|
|
429
|
+
await queryRunner.query(`DROP TABLE "core"."task_types"`);
|
|
430
|
+
await queryRunner.query(`DROP TABLE "core"."subtask_users"`);
|
|
431
|
+
await queryRunner.query(`DROP TABLE "core"."task_reminders"`);
|
|
432
|
+
await queryRunner.query(`DROP TABLE "core"."sub_tasks_tags"`);
|
|
433
|
+
await queryRunner.query(`DROP TABLE "core"."task_comments"`);
|
|
434
|
+
await queryRunner.query(`DROP TABLE "timesheet"."shifts"`);
|
|
435
|
+
await queryRunner.query(`DROP TABLE "timesheet"."role_shifts"`);
|
|
436
|
+
await queryRunner.query(`DROP TABLE "timesheet"."user_shifts"`);
|
|
437
|
+
await queryRunner.query(`DROP TYPE "timesheet"."user_shifts_allocation_type_enum"`);
|
|
438
|
+
await queryRunner.query(`DROP TABLE "user"."ownership_transfers"`);
|
|
439
|
+
await queryRunner.query(`DROP TABLE "user"."upload_logs"`);
|
|
440
|
+
await queryRunner.query(`DROP TYPE "user"."upload_logs_status_enum"`);
|
|
441
|
+
await queryRunner.query(`DROP TYPE "user"."upload_logs_module_enum"`);
|
|
442
|
+
await queryRunner.query(`DROP TABLE "user"."user_session_history"`);
|
|
443
|
+
await queryRunner.query(`DROP INDEX "user"."IDX_294abca5a52489a05379cbf645"`);
|
|
444
|
+
await queryRunner.query(`DROP INDEX "user"."IDX_8685243ec9ac46c27a1935ea69"`);
|
|
445
|
+
await queryRunner.query(`DROP INDEX "user"."IDX_cb75fc930b171da568cc0ffd41"`);
|
|
446
|
+
await queryRunner.query(`DROP TABLE "user"."chats"`);
|
|
447
|
+
await queryRunner.query(`DROP TABLE "user"."approval_journey"`);
|
|
448
|
+
await queryRunner.query(`DROP TYPE "user"."approval_journey_status_enum"`);
|
|
449
|
+
await queryRunner.query(`DROP TABLE "user"."approval_level_users"`);
|
|
450
|
+
await queryRunner.query(`DROP TABLE "user"."approval_levels"`);
|
|
451
|
+
await queryRunner.query(`DROP TABLE "user"."approval_level_escalations"`);
|
|
452
|
+
await queryRunner.query(`DROP TABLE "user"."approval_level_escalation_users"`);
|
|
453
|
+
await queryRunner.query(`DROP TABLE "user"."approval_hierarchy"`);
|
|
454
|
+
await queryRunner.query(`DROP TYPE "user"."approval_hierarchy_initiator_type_enum"`);
|
|
455
|
+
await queryRunner.query(`DROP TABLE "user"."approval_hierarchy_roles"`);
|
|
456
|
+
await queryRunner.query(`DROP TABLE "user"."approval_hierarchy_users"`);
|
|
457
|
+
await queryRunner.query(`DROP TABLE "user"."approval_conditions"`);
|
|
458
|
+
await queryRunner.query(`DROP TYPE "user"."approval_conditions_conditions_enum"`);
|
|
459
|
+
await queryRunner.query(`DROP TABLE "user"."user_roles"`);
|
|
460
|
+
await queryRunner.query(`DROP TABLE "user"."roles"`);
|
|
461
|
+
await queryRunner.query(`DROP TABLE "user"."role_permissions"`);
|
|
462
|
+
await queryRunner.query(`DROP TABLE "user"."permissions"`);
|
|
463
|
+
await queryRunner.query(`DROP TABLE "user"."departments"`);
|
|
464
|
+
await queryRunner.query(`DROP TABLE "core"."timesheet_summaries"`);
|
|
465
|
+
await queryRunner.query(`DROP TABLE "core"."tasks_tags"`);
|
|
466
|
+
await queryRunner.query(`DROP TABLE "core"."tags"`);
|
|
467
|
+
await queryRunner.query(`DROP TABLE "core"."matters_tags"`);
|
|
468
|
+
await queryRunner.query(`DROP TABLE "core"."groups"`);
|
|
469
|
+
await queryRunner.query(`DROP TABLE "core"."contacts"`);
|
|
470
|
+
await queryRunner.query(`DROP TABLE "core"."activity_logs"`);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
exports.InitialMigration1770706648232 = InitialMigration1770706648232;
|
|
474
|
+
//# sourceMappingURL=1770706648232-initialMigration.js.map
|