efiber-prisma-schema 2.0.5 → 2.0.7

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.
Files changed (383) hide show
  1. package/package.json +19 -18
  2. package/prisma/schema.prisma +2 -1
  3. package/index.d.ts +0 -10
  4. package/index.js +0 -10
  5. package/prisma/generated/browser.ts +0 -559
  6. package/prisma/generated/client.ts +0 -581
  7. package/prisma/generated/commonInputTypes.ts +0 -1246
  8. package/prisma/generated/enums.ts +0 -188
  9. package/prisma/generated/internal/class.ts +0 -1260
  10. package/prisma/generated/internal/prismaNamespace.ts +0 -11532
  11. package/prisma/generated/internal/prismaNamespaceBrowser.ts +0 -2582
  12. package/prisma/generated/models/AttributeDefinition.ts +0 -1498
  13. package/prisma/generated/models/AttributeValue.ts +0 -1419
  14. package/prisma/generated/models/Audit.ts +0 -1725
  15. package/prisma/generated/models/BillOfMaterial.ts +0 -1934
  16. package/prisma/generated/models/Building.ts +0 -6130
  17. package/prisma/generated/models/BuildingTemplate.ts +0 -2912
  18. package/prisma/generated/models/Cable.ts +0 -10501
  19. package/prisma/generated/models/CableAttachment.ts +0 -1530
  20. package/prisma/generated/models/CableAttributes.ts +0 -2244
  21. package/prisma/generated/models/CableTemplate.ts +0 -3170
  22. package/prisma/generated/models/CamusatClient.ts +0 -2001
  23. package/prisma/generated/models/CamusatCountry.ts +0 -2425
  24. package/prisma/generated/models/CentralOffice.ts +0 -1921
  25. package/prisma/generated/models/CentralOfficeTeam.ts +0 -1620
  26. package/prisma/generated/models/CentralOfficeUser.ts +0 -1650
  27. package/prisma/generated/models/Cluster.ts +0 -10984
  28. package/prisma/generated/models/ClusterComments.ts +0 -1668
  29. package/prisma/generated/models/ClusterNotes.ts +0 -1703
  30. package/prisma/generated/models/Conduit.ts +0 -5119
  31. package/prisma/generated/models/ConduitTemplate.ts +0 -2940
  32. package/prisma/generated/models/Country.ts +0 -1795
  33. package/prisma/generated/models/DispatchMaterial.ts +0 -3070
  34. package/prisma/generated/models/DispatchProject.ts +0 -4179
  35. package/prisma/generated/models/DispatchTeam.ts +0 -3053
  36. package/prisma/generated/models/Duct.ts +0 -1813
  37. package/prisma/generated/models/ElementNode.ts +0 -4413
  38. package/prisma/generated/models/ElementRelation.ts +0 -1644
  39. package/prisma/generated/models/EmailConfigurations.ts +0 -3736
  40. package/prisma/generated/models/EmailTemplates.ts +0 -1739
  41. package/prisma/generated/models/EmailsIncoming.ts +0 -2010
  42. package/prisma/generated/models/EmailsIncomingSample.ts +0 -1503
  43. package/prisma/generated/models/EmailsOutgoing.ts +0 -1648
  44. package/prisma/generated/models/FDTSRO.ts +0 -6180
  45. package/prisma/generated/models/FDTSROTemplate.ts +0 -2912
  46. package/prisma/generated/models/Feature.ts +0 -1867
  47. package/prisma/generated/models/FeatureType.ts +0 -1430
  48. package/prisma/generated/models/IntegrationReportTemplate.ts +0 -1878
  49. package/prisma/generated/models/Loop.ts +0 -5271
  50. package/prisma/generated/models/LoopTemplate.ts +0 -2912
  51. package/prisma/generated/models/MainProject.ts +0 -1664
  52. package/prisma/generated/models/Manhole.ts +0 -5090
  53. package/prisma/generated/models/ManholeTemplate.ts +0 -2912
  54. package/prisma/generated/models/MapElement.ts +0 -3450
  55. package/prisma/generated/models/MapElementTemplate.ts +0 -2742
  56. package/prisma/generated/models/Material.ts +0 -1963
  57. package/prisma/generated/models/MaterialBillOfMaterial.ts +0 -1737
  58. package/prisma/generated/models/MaterialChangeLog.ts +0 -1454
  59. package/prisma/generated/models/NetworkElement.ts +0 -6891
  60. package/prisma/generated/models/NetworkElementInstallation.ts +0 -3320
  61. package/prisma/generated/models/Notifications.ts +0 -1563
  62. package/prisma/generated/models/OptionSource.ts +0 -1132
  63. package/prisma/generated/models/PboFat.ts +0 -8248
  64. package/prisma/generated/models/PboFatAttributes.ts +0 -2672
  65. package/prisma/generated/models/PboFatTemplate.ts +0 -3112
  66. package/prisma/generated/models/Platform.ts +0 -1759
  67. package/prisma/generated/models/Pole.ts +0 -5266
  68. package/prisma/generated/models/PoleTemplate.ts +0 -2912
  69. package/prisma/generated/models/Position.ts +0 -1490
  70. package/prisma/generated/models/PreviousEquipment.ts +0 -1881
  71. package/prisma/generated/models/Project.ts +0 -14893
  72. package/prisma/generated/models/ProjectType.ts +0 -1351
  73. package/prisma/generated/models/ProjectWorkFlow.ts +0 -1856
  74. package/prisma/generated/models/ReportFormats.ts +0 -1768
  75. package/prisma/generated/models/ReportFormulaConfig.ts +0 -1375
  76. package/prisma/generated/models/ReportMetric.ts +0 -1737
  77. package/prisma/generated/models/ReportTable.ts +0 -1498
  78. package/prisma/generated/models/ReportVisualization.ts +0 -1446
  79. package/prisma/generated/models/Revision.ts +0 -4653
  80. package/prisma/generated/models/Role.ts +0 -2960
  81. package/prisma/generated/models/SFU.ts +0 -5977
  82. package/prisma/generated/models/SFUTemplate.ts +0 -2912
  83. package/prisma/generated/models/SpliceClosure.ts +0 -6405
  84. package/prisma/generated/models/SpliceClosureAttributes.ts +0 -2172
  85. package/prisma/generated/models/SpliceClosureTemplate.ts +0 -3176
  86. package/prisma/generated/models/Splitter.ts +0 -1459
  87. package/prisma/generated/models/StockMovement.ts +0 -1589
  88. package/prisma/generated/models/SubsidiaryMaterial.ts +0 -2193
  89. package/prisma/generated/models/SubsidiaryMaterialMovementLog.ts +0 -1966
  90. package/prisma/generated/models/Team.ts +0 -2044
  91. package/prisma/generated/models/TeamMaterial.ts +0 -2193
  92. package/prisma/generated/models/TeamMaterialMovementLog.ts +0 -1966
  93. package/prisma/generated/models/TeamPlatform.ts +0 -1874
  94. package/prisma/generated/models/TeamType.ts +0 -1655
  95. package/prisma/generated/models/Template.ts +0 -1691
  96. package/prisma/generated/models/TemplateComponent.ts +0 -1995
  97. package/prisma/generated/models/User.ts +0 -25676
  98. package/prisma/generated/models/WorkOrder.ts +0 -5901
  99. package/prisma/generated/models/WorkOrderActivityLog.ts +0 -2126
  100. package/prisma/generated/models/WorkOrderChannel.ts +0 -1454
  101. package/prisma/generated/models/WorkOrderComments.ts +0 -1687
  102. package/prisma/generated/models/WorkOrderEditLog.ts +0 -1757
  103. package/prisma/generated/models/WorkOrderMaterial.ts +0 -1933
  104. package/prisma/generated/models/WorkOrderPauses.ts +0 -1454
  105. package/prisma/generated/models/WorkOrderTask.ts +0 -2220
  106. package/prisma/generated/models/WorkOrderTaskData.ts +0 -1244
  107. package/prisma/generated/models/ZoneNro.ts +0 -3926
  108. package/prisma/generated/models/ZoneNroTemplate.ts +0 -2966
  109. package/prisma/generated/models/clientMaterial.ts +0 -2193
  110. package/prisma/generated/models/clientMaterialMovementLog.ts +0 -1966
  111. package/prisma/generated/models/ductTemplate.ts +0 -1606
  112. package/prisma/generated/models/installationSequence.ts +0 -1708
  113. package/prisma/generated/models/integrationProjectUserStatus.ts +0 -1916
  114. package/prisma/generated/models/integrationUserLocation.ts +0 -1681
  115. package/prisma/generated/models/problemCategorization.ts +0 -1543
  116. package/prisma/generated/models/projectPhaseLog.ts +0 -1728
  117. package/prisma/generated/models/qrCodeTag.ts +0 -4978
  118. package/prisma/generated/models/qrCodeTemplate.ts +0 -6500
  119. package/prisma/generated/models/ticketMaterialMovementLog.ts +0 -1651
  120. package/prisma/generated/models.ts +0 -119
  121. package/prisma/migrations/0_init/migration.sql +0 -0
  122. package/prisma/migrations/20231209164007_/migration.sql +0 -8
  123. package/prisma/migrations/20231209192452_country_table/migration.sql +0 -7
  124. package/prisma/migrations/20231209194848_/migration.sql +0 -10
  125. package/prisma/migrations/20231209195140_/migration.sql +0 -8
  126. package/prisma/migrations/20231209201218_country_update/migration.sql +0 -29
  127. package/prisma/migrations/20231209201405_/migration.sql +0 -8
  128. package/prisma/migrations/20231209213149_camusat_country/migration.sql +0 -20
  129. package/prisma/migrations/20231209221814_platform/migration.sql +0 -26
  130. package/prisma/migrations/20231209223246_/migration.sql +0 -16
  131. package/prisma/migrations/20231209231721_roles/migration.sql +0 -34
  132. package/prisma/migrations/20231210113501_team_and_users/migration.sql +0 -119
  133. package/prisma/migrations/20231210181832_user_update/migration.sql +0 -25
  134. package/prisma/migrations/20231219121311_add_projects/migration.sql +0 -60
  135. package/prisma/migrations/20231219123045_/migration.sql +0 -8
  136. package/prisma/migrations/20231219123850_audit/migration.sql +0 -20
  137. package/prisma/migrations/20240116090035_/migration.sql +0 -57
  138. package/prisma/migrations/20240202082320_init/migration.sql +0 -17
  139. package/prisma/migrations/20240202091027_camusat_client/migration.sql +0 -29
  140. package/prisma/migrations/20240202124330_camusatcountry/migration.sql +0 -20
  141. package/prisma/migrations/20240203085209_feature/migration.sql +0 -66
  142. package/prisma/migrations/20240203123342_feature/migration.sql +0 -38
  143. package/prisma/migrations/20240203124454_featuretype/migration.sql +0 -30
  144. package/prisma/migrations/20240203134414_featuretype/migration.sql +0 -8
  145. package/prisma/migrations/20240203154141_featuretype/migration.sql +0 -47
  146. package/prisma/migrations/20240203203915_template/migration.sql +0 -82
  147. package/prisma/migrations/20240204040725_template_component/migration.sql +0 -83
  148. package/prisma/migrations/20240204043127_template_component/migration.sql +0 -3
  149. package/prisma/migrations/20240204051036_template_component/migration.sql +0 -17
  150. package/prisma/migrations/20240204052923_template_component/migration.sql +0 -24
  151. package/prisma/migrations/20240204103902_template_component/migration.sql +0 -10
  152. package/prisma/migrations/20240204112656_camusat_client/migration.sql +0 -13
  153. package/prisma/migrations/20240204113143_camusat_client/migration.sql +0 -16
  154. package/prisma/migrations/20240204133932_camusat_client/migration.sql +0 -13
  155. package/prisma/migrations/20240204134637_camusat_client/migration.sql +0 -16
  156. package/prisma/migrations/20240204135459_camusat_client/migration.sql +0 -8
  157. package/prisma/migrations/20240204135615_camusat_client/migration.sql +0 -16
  158. package/prisma/migrations/20240204141001_camusat_client/migration.sql +0 -16
  159. package/prisma/migrations/20240205070804_template/migration.sql +0 -60
  160. package/prisma/migrations/20240205071138_template/migration.sql +0 -8
  161. package/prisma/migrations/20240205074015_template/migration.sql +0 -11
  162. package/prisma/migrations/20240205100949_template/migration.sql +0 -3
  163. package/prisma/migrations/20240205170632_template/migration.sql +0 -26
  164. package/prisma/migrations/20240205171038_template/migration.sql +0 -8
  165. package/prisma/migrations/20240206115225_template/migration.sql +0 -2
  166. package/prisma/migrations/20240206115743_template/migration.sql +0 -8
  167. package/prisma/migrations/20240206122145_template/migration.sql +0 -8
  168. package/prisma/migrations/20240206122530_template/migration.sql +0 -17
  169. package/prisma/migrations/20240206124010_template/migration.sql +0 -2
  170. package/prisma/migrations/20240206124504_template/migration.sql +0 -8
  171. package/prisma/migrations/20240207123737_template_component/migration.sql +0 -27
  172. package/prisma/migrations/20240207182427_project_workflow/migration.sql +0 -13
  173. package/prisma/migrations/20240208080438_project_workflow/migration.sql +0 -29
  174. package/prisma/migrations/20240208094341_project_workflow/migration.sql +0 -20
  175. package/prisma/migrations/20240208094513_project_workflow/migration.sql +0 -11
  176. package/prisma/migrations/20240208110543_feature/migration.sql +0 -42
  177. package/prisma/migrations/20240209094123_feature/migration.sql +0 -2
  178. package/prisma/migrations/20240211174122_camusat_client/migration.sql +0 -2
  179. package/prisma/migrations/20240219060721_feature/migration.sql +0 -14
  180. package/prisma/migrations/20240220085809_emails/migration.sql +0 -82
  181. package/prisma/migrations/20240226075734_update_email_config_and_workorder/migration.sql +0 -33
  182. package/prisma/migrations/20240227112839_update_email_config/migration.sql +0 -2
  183. package/prisma/migrations/20240227124801_work_order_update/migration.sql +0 -6
  184. package/prisma/migrations/20240301063634_material/migration.sql +0 -40
  185. package/prisma/migrations/20240301064450_material/migration.sql +0 -8
  186. package/prisma/migrations/20240301071914_bill_of_material/migration.sql +0 -32
  187. package/prisma/migrations/20240301130744_dispatch_material/migration.sql +0 -19
  188. package/prisma/migrations/20240304051150_dispatch_material/migration.sql +0 -5
  189. package/prisma/migrations/20240304060722_dispatch_material/migration.sql +0 -5
  190. package/prisma/migrations/20240304060902_dispatch_material/migration.sql +0 -8
  191. package/prisma/migrations/20240304061156_dispatch_material/migration.sql +0 -9
  192. package/prisma/migrations/20240304173952_stock_movement/migration.sql +0 -40
  193. package/prisma/migrations/20240305072137_stock_movement/migration.sql +0 -239
  194. package/prisma/migrations/20240305072744_stock_movement/migration.sql +0 -12
  195. package/prisma/migrations/20240306055959_stock_movement/migration.sql +0 -11
  196. package/prisma/migrations/20240306062724_stock_movement/migration.sql +0 -2
  197. package/prisma/migrations/20240306113309_stock_movement/migration.sql +0 -8
  198. package/prisma/migrations/20240306141448_stock_movement/migration.sql +0 -5
  199. package/prisma/migrations/20240306144254_stock_movement/migration.sql +0 -5
  200. package/prisma/migrations/20240306154800_stock_movement/migration.sql +0 -8
  201. package/prisma/migrations/20240307095205_stock_movement/migration.sql +0 -16
  202. package/prisma/migrations/20240308175028_new/migration.sql +0 -8
  203. package/prisma/migrations/20240310114206_dispatch_project/migration.sql +0 -5
  204. package/prisma/migrations/20240311121226_new/migration.sql +0 -71
  205. package/prisma/migrations/20240311171024_new/migration.sql +0 -8
  206. package/prisma/migrations/20240312090511_material/migration.sql +0 -17
  207. package/prisma/migrations/20240312095600_material/migration.sql +0 -16
  208. package/prisma/migrations/20240312115431_material/migration.sql +0 -11
  209. package/prisma/migrations/20240316161358_work_order/migration.sql +0 -3
  210. package/prisma/migrations/20240318112352_problem_categorization/migration.sql +0 -14
  211. package/prisma/migrations/20240318112616_problem_categorization/migration.sql +0 -8
  212. package/prisma/migrations/20240319072457_work_order/migration.sql +0 -5
  213. package/prisma/migrations/20240320124008_dispatch_project/migration.sql +0 -26
  214. package/prisma/migrations/20240321081929_dispatch_project/migration.sql +0 -8
  215. package/prisma/migrations/20240321102139_work_order/migration.sql +0 -45
  216. package/prisma/migrations/20240321103420_work_order/migration.sql +0 -14
  217. package/prisma/migrations/20240321103537_work_order/migration.sql +0 -2
  218. package/prisma/migrations/20240322061027_material/migration.sql +0 -11
  219. package/prisma/migrations/20240323122952_work_order/migration.sql +0 -6
  220. package/prisma/migrations/20240323125822_work_order/migration.sql +0 -2
  221. package/prisma/migrations/20240325082900_work_order/migration.sql +0 -11
  222. package/prisma/migrations/20240326115608_work_order/migration.sql +0 -18
  223. package/prisma/migrations/20240327051438_work_order/migration.sql +0 -8
  224. package/prisma/migrations/20240327100905_work_order/migration.sql +0 -24
  225. package/prisma/migrations/20240328121421_work_order/migration.sql +0 -26
  226. package/prisma/migrations/20240328122320_work_order/migration.sql +0 -9
  227. package/prisma/migrations/20240328123833_work_order/migration.sql +0 -3
  228. package/prisma/migrations/20240328132921_work_order/migration.sql +0 -5
  229. package/prisma/migrations/20240328142205_work_order/migration.sql +0 -2
  230. package/prisma/migrations/20240401184203_billof_material/migration.sql +0 -8
  231. package/prisma/migrations/20240402125649_feature/migration.sql +0 -2
  232. package/prisma/migrations/20240404054220_project/migration.sql +0 -29
  233. package/prisma/migrations/20240407224722_user/migration.sql +0 -2
  234. package/prisma/migrations/20240408100730_template_component/migration.sql +0 -12
  235. package/prisma/migrations/20240409094754_template/migration.sql +0 -2
  236. package/prisma/migrations/20240409095653_template/migration.sql +0 -2
  237. package/prisma/migrations/20240409100032_features/migration.sql +0 -2
  238. package/prisma/migrations/20240409100313_project/migration.sql +0 -5
  239. package/prisma/migrations/20240411073053_subject_email_configurations/migration.sql +0 -2
  240. package/prisma/migrations/20240412093517_work_order_tasks/migration.sql +0 -3
  241. package/prisma/migrations/20240413085449_problem_categorization/migration.sql +0 -5
  242. package/prisma/migrations/20240415101559_project/migration.sql +0 -20
  243. package/prisma/migrations/20240417062104_sync_to_git/migration.sql +0 -122
  244. package/prisma/migrations/20240417125606_workorder/migration.sql +0 -2
  245. package/prisma/migrations/20240422112728_movement_logs/migration.sql +0 -17
  246. package/prisma/migrations/20240423100846_work_order_task/migration.sql +0 -3
  247. package/prisma/migrations/20240428163748_email_count/migration.sql +0 -6
  248. package/prisma/migrations/20240430112607_work_order_edit_logs/migration.sql +0 -25
  249. package/prisma/migrations/20240502051952_template_status_color/migration.sql +0 -2
  250. package/prisma/migrations/20240506195539_projecttypes/migration.sql +0 -29
  251. package/prisma/migrations/20240508074229_workorder_task/migration.sql +0 -2
  252. package/prisma/migrations/20240515065236_coms/migration.sql +0 -21
  253. package/prisma/migrations/20240516093046_subsidiary_prefix/migration.sql +0 -2
  254. package/prisma/migrations/20240516170701_/migration.sql +0 -9
  255. package/prisma/migrations/20240520093356_emailconfig/migration.sql +0 -13
  256. package/prisma/migrations/20240530093136_emailtemplates/migration.sql +0 -24
  257. package/prisma/migrations/20240530110729_emailtemplates/migration.sql +0 -4
  258. package/prisma/migrations/20240530113416_emailtemplates/migration.sql +0 -9
  259. package/prisma/migrations/20240605072947_audit/migration.sql +0 -2
  260. package/prisma/migrations/20240605130105_notification_tokens/migration.sql +0 -2
  261. package/prisma/migrations/20240606074325_notifications/migration.sql +0 -21
  262. package/prisma/migrations/20240606074819_notif2/migration.sql +0 -8
  263. package/prisma/migrations/20240606172109_excel_config/migration.sql +0 -2
  264. package/prisma/migrations/20240607094457_reportformats/migration.sql +0 -27
  265. package/prisma/migrations/20240611101040_audit_matrices/migration.sql +0 -2
  266. package/prisma/migrations/20240611102951_workorder_audit_matrix/migration.sql +0 -2
  267. package/prisma/migrations/20240613063600_dispatch_roles/migration.sql +0 -18
  268. package/prisma/migrations/20240613071005_permissions_view_schedule/migration.sql +0 -2
  269. package/prisma/migrations/20240703093757_email_templates_templateinfo/migration.sql +0 -2
  270. package/prisma/migrations/20240715124159_mainproject_roles/migration.sql +0 -5
  271. package/prisma/migrations/20240722073020_admin_permissions_update/migration.sql +0 -4
  272. package/prisma/migrations/20240722082135_edit_projects/migration.sql +0 -2
  273. package/prisma/migrations/20240726090437_user_refresh_token/migration.sql +0 -11
  274. package/prisma/migrations/20240729135109_project_workflow_edit/migration.sql +0 -2
  275. package/prisma/migrations/20240729140705_template_component_project_index/migration.sql +0 -2
  276. package/prisma/migrations/20240731061332_report_format_bom_info/migration.sql +0 -2
  277. package/prisma/migrations/20240805073630_user_platform_relationship/migration.sql +0 -17
  278. package/prisma/migrations/20240809075746_workorder_sla/migration.sql +0 -2
  279. package/prisma/migrations/20240814094717_platform_to_project/migration.sql +0 -17
  280. package/prisma/migrations/20240814102025_platforms_to_project/migration.sql +0 -8
  281. package/prisma/migrations/20240819093908_network_elements/migration.sql +0 -239
  282. package/prisma/migrations/20240820092024_network_element_attributes/migration.sql +0 -276
  283. package/prisma/migrations/20240826083231_fat_template/migration.sql +0 -45
  284. package/prisma/migrations/20240826085204_pbo_pbo_template_to_project/migration.sql +0 -23
  285. package/prisma/migrations/20240826091924_attributes_to_fat_optional/migration.sql +0 -15
  286. package/prisma/migrations/20240902094457_email_signature/migration.sql +0 -2
  287. package/prisma/migrations/20240904092123_pbo_fat_zone_geometry/migration.sql +0 -16
  288. package/prisma/migrations/20240905125754_fat_name_attributes/migration.sql +0 -3
  289. package/prisma/migrations/20240905131742_fat_attribute_visible_on_mobile/migration.sql +0 -2
  290. package/prisma/migrations/20240911083041_country_list_user/migration.sql +0 -17
  291. package/prisma/migrations/20240911135957_actiondate_workorder_activity_log/migration.sql +0 -2
  292. package/prisma/migrations/20240911140227_workorder_activity_log_action_date_string_to_datetime/migration.sql +0 -9
  293. package/prisma/migrations/20240916130344_cable_template/migration.sql +0 -72
  294. package/prisma/migrations/20240916132002_cable_terminal_access/migration.sql +0 -5
  295. package/prisma/migrations/20240917113037_cable_id_on_cable_attributes_optional/migration.sql +0 -8
  296. package/prisma/migrations/20240917114004_visible_on_mobile_cable_attributes/migration.sql +0 -2
  297. package/prisma/migrations/20240917114107_visible_on_mobile_cable_attributes/migration.sql +0 -9
  298. package/prisma/migrations/20240919080014_create_cluster_and_central_office_tables/migration.sql +0 -54
  299. package/prisma/migrations/20240920092832_create_qr_code/migration.sql +0 -39
  300. package/prisma/migrations/20240924121308_qrcode_tag/migration.sql +0 -23
  301. package/prisma/migrations/20241003093709_integration_login_permissions/migration.sql +0 -3
  302. package/prisma/migrations/20241024090904_project_phase/migration.sql +0 -2
  303. package/prisma/migrations/20241024115650_project_phase_log/migration.sql +0 -24
  304. package/prisma/migrations/20241026095632_pbo_fat_attributes/migration.sql +0 -2
  305. package/prisma/migrations/20241028095307_qr_code_template_i_ds/migration.sql +0 -9
  306. package/prisma/migrations/20241029081315_add_more_network_elements/migration.sql +0 -273
  307. package/prisma/migrations/20241029084826_cable_coordinates/migration.sql +0 -5
  308. package/prisma/migrations/20241029092244_splice_closure_to_project/migration.sql +0 -5
  309. package/prisma/migrations/20241029092705_splice_closure_to_cluster/migration.sql +0 -5
  310. package/prisma/migrations/20241029094049_network_element_templates/migration.sql +0 -295
  311. package/prisma/migrations/20241029102645_network_elements_name/migration.sql +0 -50
  312. package/prisma/migrations/20241102074544_mail_carboncopy_list/migration.sql +0 -2
  313. package/prisma/migrations/20241104114549_change_qr_code_to_qr_code_template/migration.sql +0 -122
  314. package/prisma/migrations/20241104121110_qr_code_template_to_network_element_template/migration.sql +0 -33
  315. package/prisma/migrations/20241106101316_zone_coordinates/migration.sql +0 -5
  316. package/prisma/migrations/20241201141127_auto_name_elements/migration.sql +0 -39
  317. package/prisma/migrations/20241201144124_auto_name_element/migration.sql +0 -39
  318. package/prisma/migrations/20241201150401_template_index/migration.sql +0 -29
  319. package/prisma/migrations/20241205084445_template_id/migration.sql +0 -59
  320. package/prisma/migrations/20241205093552_integration_project_user_status/migration.sql +0 -23
  321. package/prisma/migrations/20241211093653_installation_sequence/migration.sql +0 -90
  322. package/prisma/migrations/20241211150807_installation_index/migration.sql +0 -2
  323. package/prisma/migrations/20241217082800_cluster_boundary/migration.sql +0 -3
  324. package/prisma/migrations/20250114092907_workorder_to_pbo_fat/migration.sql +0 -5
  325. package/prisma/migrations/20250114112746_workorder_to_sfu_and_building/migration.sql +0 -9
  326. package/prisma/migrations/20250211070850_networkelement_sequence/migration.sql +0 -19
  327. package/prisma/migrations/20250211072332_refresh_db/migration.sql +0 -95
  328. package/prisma/migrations/20250211080946_installation_sequence_self_relation/migration.sql +0 -6
  329. package/prisma/migrations/20250220100853_cluster_to_user_status/migration.sql +0 -32
  330. package/prisma/migrations/20250228100106_qr_code_template_to_cluster/migration.sql +0 -5
  331. package/prisma/migrations/20250304155122_clusters_to_users_centraloffices_to_users/migration.sql +0 -50
  332. package/prisma/migrations/20250306100801_templates_to_projects/migration.sql +0 -244
  333. package/prisma/migrations/20250306101814_cluster_naming_convention/migration.sql +0 -2
  334. package/prisma/migrations/20250311083647_previous_equipment/migration.sql +0 -28
  335. package/prisma/migrations/20250311141713_make_qrcode_template_prefix_unique/migration.sql +0 -8
  336. package/prisma/migrations/20250313114158_ne_coordinates/migration.sql +0 -32
  337. package/prisma/migrations/20250317072348_integration_user_location_model/migration.sql +0 -23
  338. package/prisma/migrations/20250416100413_standardize_cluster_centraloffice_qrcode/migration.sql +0 -8
  339. package/prisma/migrations/20250514130302_work_order_pause_table/migration.sql +0 -18
  340. package/prisma/migrations/20250514143429_work_order_pauses_end_at_nullable/migration.sql +0 -2
  341. package/prisma/migrations/20250514144701_workorder_is_paused_column/migration.sql +0 -2
  342. package/prisma/migrations/20250516124919_team_to_dispatch_team/migration.sql +0 -5
  343. package/prisma/migrations/20250519061226_camusat_client_to_user/migration.sql +0 -16
  344. package/prisma/migrations/20250611094742_integration_reports_kpi/migration.sql +0 -136
  345. package/prisma/migrations/20250618064448_optionalize_report_metrics/migration.sql +0 -4
  346. package/prisma/migrations/20250618072220_metricids_to_reportvisualization/migration.sql +0 -12
  347. package/prisma/migrations/20250618140056_report_metric_type/migration.sql +0 -5
  348. package/prisma/migrations/20250701090108_network_element_classification/migration.sql +0 -5
  349. package/prisma/migrations/20250701095803_network_element_texts/migration.sql +0 -59
  350. package/prisma/migrations/20250702092223_network_elements_files/migration.sql +0 -59
  351. package/prisma/migrations/20250730060532_mapelements/migration.sql +0 -95
  352. package/prisma/migrations/20250730080107_map_element_type/migration.sql +0 -8
  353. package/prisma/migrations/20250730152717_map_element_templates_to_projects/migration.sql +0 -28
  354. package/prisma/migrations/20250825114129_as_built_coordinates/migration.sql +0 -23
  355. package/prisma/migrations/20250826103723_central_office_team/migration.sql +0 -44
  356. package/prisma/migrations/20250828071450_is_installed/migration.sql +0 -37
  357. package/prisma/migrations/20250828080138_installation_status/migration.sql +0 -2
  358. package/prisma/migrations/20250901055110_web_notifications/migration.sql +0 -8
  359. package/prisma/migrations/20250901072039_cluster_comments/migration.sql +0 -22
  360. package/prisma/migrations/20250901112738_cluster_status_phase/migration.sql +0 -17
  361. package/prisma/migrations/20250902073555_cluster_comments_type/migration.sql +0 -9
  362. package/prisma/migrations/20250902170717_ne_installation_status/migration.sql +0 -35
  363. package/prisma/migrations/20250903092620_network_element_revision/migration.sql +0 -91
  364. package/prisma/migrations/20250903094438_revision_to_cluster/migration.sql +0 -5
  365. package/prisma/migrations/20250909084233_element_node/migration.sql +0 -191
  366. package/prisma/migrations/20250925093531_cluster_notes/migration.sql +0 -27
  367. package/prisma/migrations/20251010080110_create_conduit_ne/migration.sql +0 -212
  368. package/prisma/migrations/20251010083652_conduit_coordinates/migration.sql +0 -2
  369. package/prisma/migrations/20251015110151_denormalized_attributes_fat/migration.sql +0 -79
  370. package/prisma/migrations/20251015114440_fat_maximum_capacity/migration.sql +0 -9
  371. package/prisma/migrations/20251022155308_client_revision_id/migration.sql +0 -2
  372. package/prisma/migrations/20251023080808_backfill_ne_attributes/migration.sql +0 -164
  373. package/prisma/migrations/20251023103204_ne_attribute_addition/migration.sql +0 -24
  374. package/prisma/migrations/20251023170405_building_address/migration.sql +0 -2
  375. package/prisma/migrations/20251025065659_sfu_address/migration.sql +0 -2
  376. package/prisma/migrations/20251028133222_workorder_config_custom_sla/migration.sql +0 -3
  377. package/prisma/migrations/20251029064618_sla_start_at/migration.sql +0 -2
  378. package/prisma/migrations/20251029072210_workorder_comments/migration.sql +0 -23
  379. package/prisma/migrations/20251105075805_cable_subcable/migration.sql +0 -7
  380. package/prisma/migrations/20251106090226_conduit_name_prefix/migration.sql +0 -2
  381. package/prisma/migrations/20251106101538_max_capacity_string/migration.sql +0 -2
  382. package/prisma/migrations/migration_lock.toml +0 -3
  383. package/prisma.config.ts +0 -18
@@ -1,191 +0,0 @@
1
- -- CreateEnum
2
- CREATE TYPE "RelationType" AS ENUM ('INSTALLED_ON', 'CONNECTED_TO', 'ENCLOSURE_ORIGIN', 'ENCLOSURE_DESTINATION');
3
-
4
- -- CreateEnum
5
- CREATE TYPE "AttributeType" AS ENUM ('TEXT', 'NUMBER', 'BOOLEAN', 'DROPDOWN', 'OPTIONS', 'DATE', 'JSON');
6
-
7
- -- AlterTable
8
- ALTER TABLE "Building" ADD COLUMN "nodeId" TEXT;
9
-
10
- -- AlterTable
11
- ALTER TABLE "Cable" ADD COLUMN "nodeId" TEXT;
12
-
13
- -- AlterTable
14
- ALTER TABLE "FDTSRO" ADD COLUMN "nodeId" TEXT;
15
-
16
- -- AlterTable
17
- ALTER TABLE "Loop" ADD COLUMN "nodeId" TEXT;
18
-
19
- -- AlterTable
20
- ALTER TABLE "Manhole" ADD COLUMN "nodeId" TEXT;
21
-
22
- -- AlterTable
23
- ALTER TABLE "MapElement" ADD COLUMN "nodeId" TEXT;
24
-
25
- -- AlterTable
26
- ALTER TABLE "PboFat" ADD COLUMN "nodeId" TEXT;
27
-
28
- -- AlterTable
29
- ALTER TABLE "Pole" ADD COLUMN "nodeId" TEXT;
30
-
31
- -- AlterTable
32
- ALTER TABLE "SFU" ADD COLUMN "nodeId" TEXT;
33
-
34
- -- AlterTable
35
- ALTER TABLE "SpliceClosure" ADD COLUMN "nodeId" TEXT;
36
-
37
- -- AlterTable
38
- ALTER TABLE "ZoneNro" ADD COLUMN "nodeId" TEXT;
39
-
40
- -- CreateTable
41
- CREATE TABLE "ElementNode" (
42
- "id" TEXT NOT NULL,
43
- "typeId" TEXT NOT NULL,
44
- "name" TEXT NOT NULL,
45
- "lat" DOUBLE PRECISION,
46
- "lng" DOUBLE PRECISION,
47
- "geometry" JSONB,
48
- "isInstalled" BOOLEAN NOT NULL DEFAULT false,
49
- "installationDate" TIMESTAMP(3),
50
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
51
- "updatedAt" TIMESTAMP(3) NOT NULL,
52
-
53
- CONSTRAINT "ElementNode_pkey" PRIMARY KEY ("id")
54
- );
55
-
56
- -- CreateTable
57
- CREATE TABLE "ElementRelation" (
58
- "id" TEXT NOT NULL,
59
- "fromId" TEXT NOT NULL,
60
- "toId" TEXT NOT NULL,
61
- "relationType" "RelationType" NOT NULL,
62
- "metadata" JSONB,
63
- "clusterId" TEXT,
64
-
65
- CONSTRAINT "ElementRelation_pkey" PRIMARY KEY ("id")
66
- );
67
-
68
- -- CreateTable
69
- CREATE TABLE "AttributeDefinition" (
70
- "id" TEXT NOT NULL,
71
- "no" SERIAL NOT NULL,
72
- "key" TEXT NOT NULL,
73
- "label" TEXT NOT NULL,
74
- "type" "AttributeType" NOT NULL,
75
- "required" BOOLEAN NOT NULL DEFAULT false,
76
- "visibleOnWeb" BOOLEAN NOT NULL DEFAULT true,
77
- "visibleOnMobile" BOOLEAN NOT NULL DEFAULT true,
78
-
79
- CONSTRAINT "AttributeDefinition_pkey" PRIMARY KEY ("id")
80
- );
81
-
82
- -- CreateTable
83
- CREATE TABLE "OptionSource" (
84
- "id" TEXT NOT NULL,
85
- "sourceType" TEXT NOT NULL,
86
- "staticOptions" JSONB,
87
- "dynamicOptions" JSONB,
88
- "foreignTable" TEXT,
89
-
90
- CONSTRAINT "OptionSource_pkey" PRIMARY KEY ("id")
91
- );
92
-
93
- -- CreateTable
94
- CREATE TABLE "AttributeValue" (
95
- "id" TEXT NOT NULL,
96
- "attributeDefId" TEXT NOT NULL,
97
- "value" TEXT NOT NULL,
98
- "nodeId" TEXT NOT NULL,
99
-
100
- CONSTRAINT "AttributeValue_pkey" PRIMARY KEY ("id")
101
- );
102
-
103
- -- CreateIndex
104
- CREATE UNIQUE INDEX "ElementNode_id_key" ON "ElementNode"("id");
105
-
106
- -- CreateIndex
107
- CREATE UNIQUE INDEX "ElementRelation_id_key" ON "ElementRelation"("id");
108
-
109
- -- CreateIndex
110
- CREATE INDEX "ElementRelation_fromId_idx" ON "ElementRelation"("fromId");
111
-
112
- -- CreateIndex
113
- CREATE INDEX "ElementRelation_toId_idx" ON "ElementRelation"("toId");
114
-
115
- -- CreateIndex
116
- CREATE INDEX "ElementRelation_relationType_idx" ON "ElementRelation"("relationType");
117
-
118
- -- CreateIndex
119
- CREATE UNIQUE INDEX "AttributeDefinition_id_key" ON "AttributeDefinition"("id");
120
-
121
- -- CreateIndex
122
- CREATE UNIQUE INDEX "AttributeDefinition_key_key" ON "AttributeDefinition"("key");
123
-
124
- -- CreateIndex
125
- CREATE UNIQUE INDEX "OptionSource_id_key" ON "OptionSource"("id");
126
-
127
- -- CreateIndex
128
- CREATE UNIQUE INDEX "AttributeValue_id_key" ON "AttributeValue"("id");
129
-
130
- -- CreateIndex
131
- CREATE INDEX "AttributeValue_nodeId_idx" ON "AttributeValue"("nodeId");
132
-
133
- -- CreateIndex
134
- CREATE INDEX "AttributeValue_attributeDefId_idx" ON "AttributeValue"("attributeDefId");
135
-
136
- -- CreateIndex
137
- CREATE INDEX "PboFat_nodeId_idx" ON "PboFat"("nodeId");
138
-
139
- -- CreateIndex
140
- CREATE INDEX "PboFat_clusterId_idx" ON "PboFat"("clusterId");
141
-
142
- -- AddForeignKey
143
- ALTER TABLE "ElementNode" ADD CONSTRAINT "ElementNode_typeId_fkey" FOREIGN KEY ("typeId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
144
-
145
- -- AddForeignKey
146
- ALTER TABLE "ElementRelation" ADD CONSTRAINT "ElementRelation_fromId_fkey" FOREIGN KEY ("fromId") REFERENCES "ElementNode"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
147
-
148
- -- AddForeignKey
149
- ALTER TABLE "ElementRelation" ADD CONSTRAINT "ElementRelation_toId_fkey" FOREIGN KEY ("toId") REFERENCES "ElementNode"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
150
-
151
- -- AddForeignKey
152
- ALTER TABLE "ElementRelation" ADD CONSTRAINT "ElementRelation_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
153
-
154
- -- AddForeignKey
155
- ALTER TABLE "AttributeValue" ADD CONSTRAINT "AttributeValue_attributeDefId_fkey" FOREIGN KEY ("attributeDefId") REFERENCES "AttributeDefinition"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
156
-
157
- -- AddForeignKey
158
- ALTER TABLE "AttributeValue" ADD CONSTRAINT "AttributeValue_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
159
-
160
- -- AddForeignKey
161
- ALTER TABLE "Cable" ADD CONSTRAINT "Cable_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
162
-
163
- -- AddForeignKey
164
- ALTER TABLE "PboFat" ADD CONSTRAINT "PboFat_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
165
-
166
- -- AddForeignKey
167
- ALTER TABLE "SpliceClosure" ADD CONSTRAINT "SpliceClosure_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
168
-
169
- -- AddForeignKey
170
- ALTER TABLE "ZoneNro" ADD CONSTRAINT "ZoneNro_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
171
-
172
- -- AddForeignKey
173
- ALTER TABLE "Pole" ADD CONSTRAINT "Pole_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
174
-
175
- -- AddForeignKey
176
- ALTER TABLE "Manhole" ADD CONSTRAINT "Manhole_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
177
-
178
- -- AddForeignKey
179
- ALTER TABLE "Loop" ADD CONSTRAINT "Loop_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
180
-
181
- -- AddForeignKey
182
- ALTER TABLE "FDTSRO" ADD CONSTRAINT "FDTSRO_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
183
-
184
- -- AddForeignKey
185
- ALTER TABLE "SFU" ADD CONSTRAINT "SFU_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
186
-
187
- -- AddForeignKey
188
- ALTER TABLE "Building" ADD CONSTRAINT "Building_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
189
-
190
- -- AddForeignKey
191
- ALTER TABLE "MapElement" ADD CONSTRAINT "MapElement_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -1,27 +0,0 @@
1
- -- AlterTable
2
- ALTER TABLE "AttributeDefinition" ADD COLUMN "visibleOnDispatchMobile" BOOLEAN NOT NULL DEFAULT true;
3
-
4
- -- CreateTable
5
- CREATE TABLE "ClusterNotes" (
6
- "id" TEXT NOT NULL,
7
- "no" SERIAL NOT NULL,
8
- "comment" TEXT NOT NULL,
9
- "hasPicture" BOOLEAN NOT NULL DEFAULT false,
10
- "coordinates" JSONB,
11
- "picture" TEXT,
12
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
13
- "updatedAt" TIMESTAMP(3) NOT NULL,
14
- "createdById" TEXT NOT NULL,
15
- "clusterId" TEXT NOT NULL,
16
-
17
- CONSTRAINT "ClusterNotes_pkey" PRIMARY KEY ("id")
18
- );
19
-
20
- -- CreateIndex
21
- CREATE UNIQUE INDEX "ClusterNotes_id_key" ON "ClusterNotes"("id");
22
-
23
- -- AddForeignKey
24
- ALTER TABLE "ClusterNotes" ADD CONSTRAINT "ClusterNotes_createdById_fkey" FOREIGN KEY ("createdById") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
25
-
26
- -- AddForeignKey
27
- ALTER TABLE "ClusterNotes" ADD CONSTRAINT "ClusterNotes_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -1,212 +0,0 @@
1
- /*
2
- Warnings:
3
-
4
- - You are about to drop the `CableAtttributes` table. If the table is not empty, all the data it contains will be lost.
5
-
6
- */
7
- -- DropForeignKey
8
- ALTER TABLE "CableAtttributes" DROP CONSTRAINT "CableAtttributes_cableId_fkey";
9
-
10
- -- DropForeignKey
11
- ALTER TABLE "CableAtttributes" DROP CONSTRAINT "CableAtttributes_cableTemplateId_fkey";
12
-
13
- -- DropForeignKey
14
- ALTER TABLE "CableAtttributes" DROP CONSTRAINT "CableAtttributes_materialId_fkey";
15
-
16
- -- DropForeignKey
17
- ALTER TABLE "CableAtttributes" DROP CONSTRAINT "CableAtttributes_projectId_fkey";
18
-
19
- -- AlterTable
20
- ALTER TABLE "Cable" ADD COLUMN "ductId" TEXT;
21
-
22
- -- AlterTable
23
- ALTER TABLE "Project" ADD COLUMN "conduitTemplateId" TEXT;
24
-
25
- -- AlterTable
26
- ALTER TABLE "qrCodeTag" ADD COLUMN "conduitId" TEXT;
27
-
28
- -- AlterTable
29
- ALTER TABLE "qrCodeTemplate" ADD COLUMN "conduitTemplateId" TEXT;
30
-
31
- -- DropTable
32
- DROP TABLE "CableAtttributes";
33
-
34
- -- CreateTable
35
- CREATE TABLE "Conduit" (
36
- "id" TEXT NOT NULL,
37
- "no" SERIAL NOT NULL,
38
- "status" TEXT NOT NULL DEFAULT 'active',
39
- "name" TEXT NOT NULL,
40
- "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
41
- "photos" JSONB,
42
- "texts" JSONB,
43
- "files" JSONB,
44
- "zone" JSONB,
45
- "geometry" JSONB,
46
- "attributes" JSONB,
47
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
48
- "updatedAt" TIMESTAMP(3) NOT NULL,
49
- "deletedAt" TIMESTAMP(3),
50
- "asBuiltCoordinates" JSONB,
51
- "isInstalled" BOOLEAN NOT NULL DEFAULT false,
52
- "installationDate" TIMESTAMP(3),
53
- "isInRevision" BOOLEAN NOT NULL DEFAULT false,
54
- "installationStatus" TEXT DEFAULT 'pending',
55
- "comments" TEXT,
56
- "updatedById" TEXT,
57
- "networkElementId" TEXT NOT NULL,
58
- "nodeId" TEXT,
59
- "installationId" TEXT,
60
- "templateId" TEXT,
61
- "clusterId" TEXT,
62
-
63
- CONSTRAINT "Conduit_pkey" PRIMARY KEY ("id")
64
- );
65
-
66
- -- CreateTable
67
- CREATE TABLE "Duct" (
68
- "id" TEXT NOT NULL,
69
- "no" SERIAL NOT NULL,
70
- "type" TEXT NOT NULL,
71
- "material" TEXT NOT NULL,
72
- "dimension" DOUBLE PRECISION NOT NULL,
73
- "typeOptions" TEXT[],
74
- "materialOptions" TEXT[],
75
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
76
- "updatedAt" TIMESTAMP(3) NOT NULL,
77
- "deletedAt" TIMESTAMP(3),
78
- "conduitId" TEXT NOT NULL,
79
-
80
- CONSTRAINT "Duct_pkey" PRIMARY KEY ("id")
81
- );
82
-
83
- -- CreateTable
84
- CREATE TABLE "ductTemplate" (
85
- "id" TEXT NOT NULL,
86
- "no" SERIAL NOT NULL,
87
- "type" TEXT NOT NULL,
88
- "material" TEXT NOT NULL,
89
- "dimension" DOUBLE PRECISION NOT NULL,
90
- "typeOptions" TEXT[],
91
- "materialOptions" TEXT[],
92
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
93
- "updatedAt" TIMESTAMP(3) NOT NULL,
94
- "deletedAt" TIMESTAMP(3),
95
- "conduitTemplateId" TEXT NOT NULL,
96
-
97
- CONSTRAINT "ductTemplate_pkey" PRIMARY KEY ("id")
98
- );
99
-
100
- -- CreateTable
101
- CREATE TABLE "ConduitTemplate" (
102
- "id" TEXT NOT NULL,
103
- "no" SERIAL NOT NULL,
104
- "status" TEXT NOT NULL DEFAULT 'active',
105
- "name" TEXT NOT NULL,
106
- "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
107
- "photos" JSONB,
108
- "texts" JSONB,
109
- "files" JSONB,
110
- "zone" JSONB,
111
- "geometry" JSONB,
112
- "attributes" JSONB,
113
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
114
- "updatedAt" TIMESTAMP(3) NOT NULL,
115
- "deletedAt" TIMESTAMP(3),
116
- "updatedById" TEXT,
117
- "networkElementId" TEXT NOT NULL,
118
- "clusterId" TEXT,
119
-
120
- CONSTRAINT "ConduitTemplate_pkey" PRIMARY KEY ("id")
121
- );
122
-
123
- -- CreateTable
124
- CREATE TABLE "CableAttributes" (
125
- "id" TEXT NOT NULL,
126
- "no" SERIAL NOT NULL,
127
- "name" TEXT NOT NULL,
128
- "description" TEXT,
129
- "value" TEXT,
130
- "visibleOnMobile" BOOLEAN NOT NULL DEFAULT false,
131
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
132
- "updatedAt" TIMESTAMP(3) NOT NULL,
133
- "deletedAt" TIMESTAMP(3),
134
- "cableId" TEXT,
135
- "projectId" TEXT,
136
- "materialId" TEXT,
137
- "cableTemplateId" TEXT,
138
-
139
- CONSTRAINT "CableAttributes_pkey" PRIMARY KEY ("id")
140
- );
141
-
142
- -- CreateIndex
143
- CREATE UNIQUE INDEX "Conduit_id_key" ON "Conduit"("id");
144
-
145
- -- CreateIndex
146
- CREATE UNIQUE INDEX "Duct_id_key" ON "Duct"("id");
147
-
148
- -- CreateIndex
149
- CREATE UNIQUE INDEX "ductTemplate_id_key" ON "ductTemplate"("id");
150
-
151
- -- CreateIndex
152
- CREATE UNIQUE INDEX "ConduitTemplate_id_key" ON "ConduitTemplate"("id");
153
-
154
- -- CreateIndex
155
- CREATE UNIQUE INDEX "CableAttributes_id_key" ON "CableAttributes"("id");
156
-
157
- -- AddForeignKey
158
- ALTER TABLE "Project" ADD CONSTRAINT "Project_conduitTemplateId_fkey" FOREIGN KEY ("conduitTemplateId") REFERENCES "ConduitTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
159
-
160
- -- AddForeignKey
161
- ALTER TABLE "Cable" ADD CONSTRAINT "Cable_ductId_fkey" FOREIGN KEY ("ductId") REFERENCES "Duct"("id") ON DELETE SET NULL ON UPDATE CASCADE;
162
-
163
- -- AddForeignKey
164
- ALTER TABLE "Conduit" ADD CONSTRAINT "Conduit_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
165
-
166
- -- AddForeignKey
167
- ALTER TABLE "Conduit" ADD CONSTRAINT "Conduit_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
168
-
169
- -- AddForeignKey
170
- ALTER TABLE "Conduit" ADD CONSTRAINT "Conduit_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "ElementNode"("id") ON DELETE SET NULL ON UPDATE CASCADE;
171
-
172
- -- AddForeignKey
173
- ALTER TABLE "Conduit" ADD CONSTRAINT "Conduit_installationId_fkey" FOREIGN KEY ("installationId") REFERENCES "NetworkElementInstallation"("id") ON DELETE SET NULL ON UPDATE CASCADE;
174
-
175
- -- AddForeignKey
176
- ALTER TABLE "Conduit" ADD CONSTRAINT "Conduit_templateId_fkey" FOREIGN KEY ("templateId") REFERENCES "ConduitTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
177
-
178
- -- AddForeignKey
179
- ALTER TABLE "Conduit" ADD CONSTRAINT "Conduit_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
180
-
181
- -- AddForeignKey
182
- ALTER TABLE "Duct" ADD CONSTRAINT "Duct_conduitId_fkey" FOREIGN KEY ("conduitId") REFERENCES "Conduit"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
183
-
184
- -- AddForeignKey
185
- ALTER TABLE "ductTemplate" ADD CONSTRAINT "ductTemplate_conduitTemplateId_fkey" FOREIGN KEY ("conduitTemplateId") REFERENCES "ConduitTemplate"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
186
-
187
- -- AddForeignKey
188
- ALTER TABLE "ConduitTemplate" ADD CONSTRAINT "ConduitTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
189
-
190
- -- AddForeignKey
191
- ALTER TABLE "ConduitTemplate" ADD CONSTRAINT "ConduitTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
192
-
193
- -- AddForeignKey
194
- ALTER TABLE "ConduitTemplate" ADD CONSTRAINT "ConduitTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
195
-
196
- -- AddForeignKey
197
- ALTER TABLE "CableAttributes" ADD CONSTRAINT "CableAttributes_cableId_fkey" FOREIGN KEY ("cableId") REFERENCES "Cable"("id") ON DELETE SET NULL ON UPDATE CASCADE;
198
-
199
- -- AddForeignKey
200
- ALTER TABLE "CableAttributes" ADD CONSTRAINT "CableAttributes_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
201
-
202
- -- AddForeignKey
203
- ALTER TABLE "CableAttributes" ADD CONSTRAINT "CableAttributes_materialId_fkey" FOREIGN KEY ("materialId") REFERENCES "Material"("id") ON DELETE SET NULL ON UPDATE CASCADE;
204
-
205
- -- AddForeignKey
206
- ALTER TABLE "CableAttributes" ADD CONSTRAINT "CableAttributes_cableTemplateId_fkey" FOREIGN KEY ("cableTemplateId") REFERENCES "CableTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
207
-
208
- -- AddForeignKey
209
- ALTER TABLE "qrCodeTemplate" ADD CONSTRAINT "qrCodeTemplate_conduitTemplateId_fkey" FOREIGN KEY ("conduitTemplateId") REFERENCES "ConduitTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
210
-
211
- -- AddForeignKey
212
- ALTER TABLE "qrCodeTag" ADD CONSTRAINT "qrCodeTag_conduitId_fkey" FOREIGN KEY ("conduitId") REFERENCES "Conduit"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -1,2 +0,0 @@
1
- -- AlterTable
2
- ALTER TABLE "Conduit" ADD COLUMN "coordinates" JSONB;
@@ -1,79 +0,0 @@
1
- -- CreateEnum
2
- CREATE TYPE "CableAttachmentRole" AS ENUM ('DESTINATION', 'ORIGIN');
3
-
4
- -- AlterTable
5
- ALTER TABLE "Cable" ADD COLUMN "brand" TEXT,
6
- ADD COLUMN "brandDescription" TEXT,
7
- ADD COLUMN "capacity" TEXT,
8
- ADD COLUMN "centralOffice" TEXT,
9
- ADD COLUMN "client" TEXT,
10
- ADD COLUMN "enclosureDestinationId" TEXT,
11
- ADD COLUMN "enclosureDestinationType" TEXT,
12
- ADD COLUMN "enclosureOriginId" TEXT,
13
- ADD COLUMN "enclosureOriginType" TEXT,
14
- ADD COLUMN "fibersActive" INTEGER,
15
- ADD COLUMN "fibersDark" INTEGER,
16
- ADD COLUMN "fibersDedicated" INTEGER,
17
- ADD COLUMN "fibersReserved" INTEGER,
18
- ADD COLUMN "mainProject" TEXT,
19
- ADD COLUMN "pboFatId" TEXT,
20
- ADD COLUMN "projectPhase" TEXT,
21
- ADD COLUMN "subsidiary" TEXT,
22
- ADD COLUMN "type" TEXT;
23
-
24
- -- AlterTable
25
- ALTER TABLE "PboFat" ADD COLUMN "address" TEXT,
26
- ADD COLUMN "brand" TEXT,
27
- ADD COLUMN "brandDescription" TEXT,
28
- ADD COLUMN "centralOffice" TEXT,
29
- ADD COLUMN "client" TEXT,
30
- ADD COLUMN "mainProject" TEXT,
31
- ADD COLUMN "materialListReference" TEXT,
32
- ADD COLUMN "nextEquipmentId" TEXT,
33
- ADD COLUMN "nextEquipmentType" TEXT,
34
- ADD COLUMN "placeOfInstallation" TEXT,
35
- ADD COLUMN "previousEquipmentId" TEXT,
36
- ADD COLUMN "previousEquipmentType" TEXT,
37
- ADD COLUMN "projectPhase" TEXT,
38
- ADD COLUMN "splitter1" TEXT,
39
- ADD COLUMN "splitter2" TEXT,
40
- ADD COLUMN "subsidiary" TEXT;
41
-
42
- -- CreateTable
43
- CREATE TABLE "CableAttachment" (
44
- "id" TEXT NOT NULL,
45
- "no" SERIAL NOT NULL,
46
- "cableId" TEXT NOT NULL,
47
- "targetType" TEXT NOT NULL,
48
- "targetId" TEXT NOT NULL,
49
- "role" "CableAttachmentRole" NOT NULL,
50
- "metadata" JSONB,
51
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
52
- "updatedAt" TIMESTAMP(3) NOT NULL,
53
-
54
- CONSTRAINT "CableAttachment_pkey" PRIMARY KEY ("id")
55
- );
56
-
57
- -- CreateIndex
58
- CREATE UNIQUE INDEX "CableAttachment_id_key" ON "CableAttachment"("id");
59
-
60
- -- CreateIndex
61
- CREATE INDEX "CableAttachment_targetType_targetId_idx" ON "CableAttachment"("targetType", "targetId");
62
-
63
- -- CreateIndex
64
- CREATE INDEX "CableAttachment_cableId_role_idx" ON "CableAttachment"("cableId", "role");
65
-
66
- -- CreateIndex
67
- CREATE UNIQUE INDEX "CableAttachment_cableId_targetType_targetId_role_key" ON "CableAttachment"("cableId", "targetType", "targetId", "role");
68
-
69
- -- CreateIndex
70
- CREATE INDEX "Cable_enclosureOriginType_enclosureOriginId_idx" ON "Cable"("enclosureOriginType", "enclosureOriginId");
71
-
72
- -- CreateIndex
73
- CREATE INDEX "Cable_enclosureDestinationType_enclosureDestinationId_idx" ON "Cable"("enclosureDestinationType", "enclosureDestinationId");
74
-
75
- -- AddForeignKey
76
- ALTER TABLE "Cable" ADD CONSTRAINT "Cable_pboFatId_fkey" FOREIGN KEY ("pboFatId") REFERENCES "PboFat"("id") ON DELETE SET NULL ON UPDATE CASCADE;
77
-
78
- -- AddForeignKey
79
- ALTER TABLE "CableAttachment" ADD CONSTRAINT "CableAttachment_cableId_fkey" FOREIGN KEY ("cableId") REFERENCES "Cable"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -1,9 +0,0 @@
1
- /*
2
- Warnings:
3
-
4
- - You are about to drop the column `fatMaxCapacity` on the `PboFat` table. All the data in the column will be lost.
5
-
6
- */
7
- -- AlterTable
8
- ALTER TABLE "PboFat" DROP COLUMN "fatMaxCapacity",
9
- ADD COLUMN "fatMaximumCapacity" INTEGER;
@@ -1,2 +0,0 @@
1
- -- AlterTable
2
- ALTER TABLE "Revision" ADD COLUMN "clientRevisionId" TEXT;