efiber-prisma-schema 1.10.3 → 1.10.5

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 (218) hide show
  1. package/package.json +1 -1
  2. package/prisma/migrations/0_init/migration.sql +0 -0
  3. package/prisma/migrations/20240202082320_init/migration.sql +17 -0
  4. package/prisma/migrations/20240202091027_camusat_client/migration.sql +29 -0
  5. package/prisma/migrations/20240202124330_camusatcountry/migration.sql +20 -0
  6. package/prisma/migrations/20240203085209_feature/migration.sql +66 -0
  7. package/prisma/migrations/20240203123342_feature/migration.sql +38 -0
  8. package/prisma/migrations/20240203124454_featuretype/migration.sql +30 -0
  9. package/prisma/migrations/20240203134414_featuretype/migration.sql +8 -0
  10. package/prisma/migrations/20240203154141_featuretype/migration.sql +47 -0
  11. package/prisma/migrations/20240203203915_template/migration.sql +82 -0
  12. package/prisma/migrations/20240204040725_template_component/migration.sql +83 -0
  13. package/prisma/migrations/20240204043127_template_component/migration.sql +3 -0
  14. package/prisma/migrations/20240204051036_template_component/migration.sql +17 -0
  15. package/prisma/migrations/20240204052923_template_component/migration.sql +24 -0
  16. package/prisma/migrations/20240204103902_template_component/migration.sql +10 -0
  17. package/prisma/migrations/20240204112656_camusat_client/migration.sql +13 -0
  18. package/prisma/migrations/20240204113143_camusat_client/migration.sql +16 -0
  19. package/prisma/migrations/20240204133932_camusat_client/migration.sql +13 -0
  20. package/prisma/migrations/20240204134637_camusat_client/migration.sql +16 -0
  21. package/prisma/migrations/20240204135459_camusat_client/migration.sql +8 -0
  22. package/prisma/migrations/20240204135615_camusat_client/migration.sql +16 -0
  23. package/prisma/migrations/20240204141001_camusat_client/migration.sql +16 -0
  24. package/prisma/migrations/20240205070804_template/migration.sql +60 -0
  25. package/prisma/migrations/20240205071138_template/migration.sql +8 -0
  26. package/prisma/migrations/20240205074015_template/migration.sql +11 -0
  27. package/prisma/migrations/20240205100949_template/migration.sql +3 -0
  28. package/prisma/migrations/20240205170632_template/migration.sql +26 -0
  29. package/prisma/migrations/20240205171038_template/migration.sql +8 -0
  30. package/prisma/migrations/20240206115225_template/migration.sql +2 -0
  31. package/prisma/migrations/20240206115743_template/migration.sql +8 -0
  32. package/prisma/migrations/20240206122145_template/migration.sql +8 -0
  33. package/prisma/migrations/20240206122530_template/migration.sql +17 -0
  34. package/prisma/migrations/20240206124010_template/migration.sql +2 -0
  35. package/prisma/migrations/20240206124504_template/migration.sql +8 -0
  36. package/prisma/migrations/20240207123737_template_component/migration.sql +27 -0
  37. package/prisma/migrations/20240207182427_project_workflow/migration.sql +13 -0
  38. package/prisma/migrations/20240208080438_project_workflow/migration.sql +29 -0
  39. package/prisma/migrations/20240208094341_project_workflow/migration.sql +20 -0
  40. package/prisma/migrations/20240208094513_project_workflow/migration.sql +11 -0
  41. package/prisma/migrations/20240208110543_feature/migration.sql +42 -0
  42. package/prisma/migrations/20240209094123_feature/migration.sql +2 -0
  43. package/prisma/migrations/20240211174122_camusat_client/migration.sql +2 -0
  44. package/prisma/migrations/20240219060721_feature/migration.sql +14 -0
  45. package/prisma/migrations/20240301063634_material/migration.sql +40 -0
  46. package/prisma/migrations/20240301064450_material/migration.sql +8 -0
  47. package/prisma/migrations/20240301071914_bill_of_material/migration.sql +32 -0
  48. package/prisma/migrations/20240301130744_dispatch_material/migration.sql +19 -0
  49. package/prisma/migrations/20240304051150_dispatch_material/migration.sql +5 -0
  50. package/prisma/migrations/20240304060722_dispatch_material/migration.sql +5 -0
  51. package/prisma/migrations/20240304060902_dispatch_material/migration.sql +8 -0
  52. package/prisma/migrations/20240304061156_dispatch_material/migration.sql +9 -0
  53. package/prisma/migrations/20240304173952_stock_movement/migration.sql +40 -0
  54. package/prisma/migrations/20240305072137_stock_movement/migration.sql +239 -0
  55. package/prisma/migrations/20240305072744_stock_movement/migration.sql +12 -0
  56. package/prisma/migrations/20240306055959_stock_movement/migration.sql +11 -0
  57. package/prisma/migrations/20240306062724_stock_movement/migration.sql +2 -0
  58. package/prisma/migrations/20240306113309_stock_movement/migration.sql +8 -0
  59. package/prisma/migrations/20240306141448_stock_movement/migration.sql +5 -0
  60. package/prisma/migrations/20240306144254_stock_movement/migration.sql +5 -0
  61. package/prisma/migrations/20240306154800_stock_movement/migration.sql +8 -0
  62. package/prisma/migrations/20240307095205_stock_movement/migration.sql +16 -0
  63. package/prisma/migrations/20240308175028_new/migration.sql +8 -0
  64. package/prisma/migrations/20240310114206_dispatch_project/migration.sql +5 -0
  65. package/prisma/migrations/20240311121226_new/migration.sql +71 -0
  66. package/prisma/migrations/20240311171024_new/migration.sql +8 -0
  67. package/prisma/migrations/20240312090511_material/migration.sql +17 -0
  68. package/prisma/migrations/20240312095600_material/migration.sql +16 -0
  69. package/prisma/migrations/20240312115431_material/migration.sql +11 -0
  70. package/prisma/migrations/20240316161358_work_order/migration.sql +3 -0
  71. package/prisma/migrations/20240318112352_problem_categorization/migration.sql +14 -0
  72. package/prisma/migrations/20240318112616_problem_categorization/migration.sql +8 -0
  73. package/prisma/migrations/20240319072457_work_order/migration.sql +5 -0
  74. package/prisma/migrations/20240320124008_dispatch_project/migration.sql +26 -0
  75. package/prisma/migrations/20240321081929_dispatch_project/migration.sql +8 -0
  76. package/prisma/migrations/20240321102139_work_order/migration.sql +45 -0
  77. package/prisma/migrations/20240321103420_work_order/migration.sql +14 -0
  78. package/prisma/migrations/20240321103537_work_order/migration.sql +2 -0
  79. package/prisma/migrations/20240322061027_material/migration.sql +11 -0
  80. package/prisma/migrations/20240323122952_work_order/migration.sql +6 -0
  81. package/prisma/migrations/20240323125822_work_order/migration.sql +2 -0
  82. package/prisma/migrations/20240325082900_work_order/migration.sql +11 -0
  83. package/prisma/migrations/20240326115608_work_order/migration.sql +18 -0
  84. package/prisma/migrations/20240327051438_work_order/migration.sql +8 -0
  85. package/prisma/migrations/20240327100905_work_order/migration.sql +24 -0
  86. package/prisma/migrations/20240328121421_work_order/migration.sql +26 -0
  87. package/prisma/migrations/20240328122320_work_order/migration.sql +9 -0
  88. package/prisma/migrations/20240328123833_work_order/migration.sql +3 -0
  89. package/prisma/migrations/20240328132921_work_order/migration.sql +5 -0
  90. package/prisma/migrations/20240328142205_work_order/migration.sql +2 -0
  91. package/prisma/migrations/20240401184203_billof_material/migration.sql +8 -0
  92. package/prisma/migrations/20240402125649_feature/migration.sql +2 -0
  93. package/prisma/migrations/20240404054220_project/migration.sql +29 -0
  94. package/prisma/migrations/20240407224722_user/migration.sql +2 -0
  95. package/prisma/migrations/20240408100730_template_component/migration.sql +12 -0
  96. package/prisma/migrations/20240409094754_template/migration.sql +2 -0
  97. package/prisma/migrations/20240409095653_template/migration.sql +2 -0
  98. package/prisma/migrations/20240409100032_features/migration.sql +2 -0
  99. package/prisma/migrations/20240409100313_project/migration.sql +5 -0
  100. package/prisma/migrations/20240411073053_subject_email_configurations/migration.sql +2 -0
  101. package/prisma/migrations/20240412093517_work_order_tasks/migration.sql +3 -0
  102. package/prisma/migrations/20240413085449_problem_categorization/migration.sql +5 -0
  103. package/prisma/migrations/20240415101559_project/migration.sql +20 -0
  104. package/prisma/migrations/20240417062104_sync_to_git/migration.sql +122 -0
  105. package/prisma/migrations/20240417125606_workorder/migration.sql +2 -0
  106. package/prisma/migrations/20240422112728_movement_logs/migration.sql +17 -0
  107. package/prisma/migrations/20240423100846_work_order_task/migration.sql +3 -0
  108. package/prisma/migrations/20240428163748_email_count/migration.sql +6 -0
  109. package/prisma/migrations/20240430112607_work_order_edit_logs/migration.sql +25 -0
  110. package/prisma/migrations/20240502051952_template_status_color/migration.sql +2 -0
  111. package/prisma/migrations/20240506195539_projecttypes/migration.sql +29 -0
  112. package/prisma/migrations/20240508074229_workorder_task/migration.sql +2 -0
  113. package/prisma/migrations/20240515065236_coms/migration.sql +21 -0
  114. package/prisma/migrations/20240516093046_subsidiary_prefix/migration.sql +2 -0
  115. package/prisma/migrations/20240516170701_/migration.sql +9 -0
  116. package/prisma/migrations/20240520093356_emailconfig/migration.sql +13 -0
  117. package/prisma/migrations/20240530093136_emailtemplates/migration.sql +24 -0
  118. package/prisma/migrations/20240530110729_emailtemplates/migration.sql +4 -0
  119. package/prisma/migrations/20240530113416_emailtemplates/migration.sql +9 -0
  120. package/prisma/migrations/20240605072947_audit/migration.sql +2 -0
  121. package/prisma/migrations/20240605130105_notification_tokens/migration.sql +2 -0
  122. package/prisma/migrations/20240606074325_notifications/migration.sql +21 -0
  123. package/prisma/migrations/20240606074819_notif2/migration.sql +8 -0
  124. package/prisma/migrations/20240606172109_excel_config/migration.sql +2 -0
  125. package/prisma/migrations/20240607094457_reportformats/migration.sql +27 -0
  126. package/prisma/migrations/20240611101040_audit_matrices/migration.sql +2 -0
  127. package/prisma/migrations/20240611102951_workorder_audit_matrix/migration.sql +2 -0
  128. package/prisma/migrations/20240613063600_dispatch_roles/migration.sql +18 -0
  129. package/prisma/migrations/20240613071005_permissions_view_schedule/migration.sql +2 -0
  130. package/prisma/migrations/20240703093757_email_templates_templateinfo/migration.sql +2 -0
  131. package/prisma/migrations/20240715124159_mainproject_roles/migration.sql +5 -0
  132. package/prisma/migrations/20240722073020_admin_permissions_update/migration.sql +4 -0
  133. package/prisma/migrations/20240722082135_edit_projects/migration.sql +2 -0
  134. package/prisma/migrations/20240726090437_user_refresh_token/migration.sql +11 -0
  135. package/prisma/migrations/20240729135109_project_workflow_edit/migration.sql +2 -0
  136. package/prisma/migrations/20240729140705_template_component_project_index/migration.sql +2 -0
  137. package/prisma/migrations/20240731061332_report_format_bom_info/migration.sql +2 -0
  138. package/prisma/migrations/20240805073630_user_platform_relationship/migration.sql +17 -0
  139. package/prisma/migrations/20240809075746_workorder_sla/migration.sql +2 -0
  140. package/prisma/migrations/20240814094717_platform_to_project/migration.sql +17 -0
  141. package/prisma/migrations/20240814102025_platforms_to_project/migration.sql +8 -0
  142. package/prisma/migrations/20240819093908_network_elements/migration.sql +239 -0
  143. package/prisma/migrations/20240820092024_network_element_attributes/migration.sql +276 -0
  144. package/prisma/migrations/20240826083231_fat_template/migration.sql +45 -0
  145. package/prisma/migrations/20240826085204_pbo_pbo_template_to_project/migration.sql +23 -0
  146. package/prisma/migrations/20240826091924_attributes_to_fat_optional/migration.sql +15 -0
  147. package/prisma/migrations/20240902094457_email_signature/migration.sql +2 -0
  148. package/prisma/migrations/20240904092123_pbo_fat_zone_geometry/migration.sql +16 -0
  149. package/prisma/migrations/20240905125754_fat_name_attributes/migration.sql +3 -0
  150. package/prisma/migrations/20240905131742_fat_attribute_visible_on_mobile/migration.sql +2 -0
  151. package/prisma/migrations/20240911083041_country_list_user/migration.sql +17 -0
  152. package/prisma/migrations/20240911135957_actiondate_workorder_activity_log/migration.sql +2 -0
  153. package/prisma/migrations/20240911140227_workorder_activity_log_action_date_string_to_datetime/migration.sql +9 -0
  154. package/prisma/migrations/20240916130344_cable_template/migration.sql +72 -0
  155. package/prisma/migrations/20240916132002_cable_terminal_access/migration.sql +5 -0
  156. package/prisma/migrations/20240917113037_cable_id_on_cable_attributes_optional/migration.sql +8 -0
  157. package/prisma/migrations/20240917114004_visible_on_mobile_cable_attributes/migration.sql +2 -0
  158. package/prisma/migrations/20240917114107_visible_on_mobile_cable_attributes/migration.sql +9 -0
  159. package/prisma/migrations/20240919080014_create_cluster_and_central_office_tables/migration.sql +54 -0
  160. package/prisma/migrations/20240920092832_create_qr_code/migration.sql +39 -0
  161. package/prisma/migrations/20240924121308_qrcode_tag/migration.sql +23 -0
  162. package/prisma/migrations/20241003093709_integration_login_permissions/migration.sql +3 -0
  163. package/prisma/migrations/20241024090904_project_phase/migration.sql +2 -0
  164. package/prisma/migrations/20241024115650_project_phase_log/migration.sql +24 -0
  165. package/prisma/migrations/20241026095632_pbo_fat_attributes/migration.sql +2 -0
  166. package/prisma/migrations/20241028095307_qr_code_template_i_ds/migration.sql +9 -0
  167. package/prisma/migrations/20241029081315_add_more_network_elements/migration.sql +273 -0
  168. package/prisma/migrations/20241029084826_cable_coordinates/migration.sql +5 -0
  169. package/prisma/migrations/20241029092244_splice_closure_to_project/migration.sql +5 -0
  170. package/prisma/migrations/20241029092705_splice_closure_to_cluster/migration.sql +5 -0
  171. package/prisma/migrations/20241029094049_network_element_templates/migration.sql +295 -0
  172. package/prisma/migrations/20241029102645_network_elements_name/migration.sql +50 -0
  173. package/prisma/migrations/20241102074544_mail_carboncopy_list/migration.sql +2 -0
  174. package/prisma/migrations/20241104114549_change_qr_code_to_qr_code_template/migration.sql +122 -0
  175. package/prisma/migrations/20241104121110_qr_code_template_to_network_element_template/migration.sql +33 -0
  176. package/prisma/migrations/20241106101316_zone_coordinates/migration.sql +5 -0
  177. package/prisma/migrations/20241201141127_auto_name_elements/migration.sql +39 -0
  178. package/prisma/migrations/20241201144124_auto_name_element/migration.sql +39 -0
  179. package/prisma/migrations/20241201150401_template_index/migration.sql +29 -0
  180. package/prisma/migrations/20241205084445_template_id/migration.sql +59 -0
  181. package/prisma/migrations/20241205093552_integration_project_user_status/migration.sql +23 -0
  182. package/prisma/migrations/20241211093653_installation_sequence/migration.sql +90 -0
  183. package/prisma/migrations/20241211150807_installation_index/migration.sql +2 -0
  184. package/prisma/migrations/20241217082800_cluster_boundary/migration.sql +3 -0
  185. package/prisma/migrations/20250114092907_workorder_to_pbo_fat/migration.sql +5 -0
  186. package/prisma/migrations/20250114112746_workorder_to_sfu_and_building/migration.sql +9 -0
  187. package/prisma/migrations/20250211070850_networkelement_sequence/migration.sql +19 -0
  188. package/prisma/migrations/20250211072332_refresh_db/migration.sql +95 -0
  189. package/prisma/migrations/20250211080946_installation_sequence_self_relation/migration.sql +6 -0
  190. package/prisma/migrations/20250220100853_cluster_to_user_status/migration.sql +32 -0
  191. package/prisma/migrations/20250228100106_qr_code_template_to_cluster/migration.sql +5 -0
  192. package/prisma/migrations/20250304155122_clusters_to_users_centraloffices_to_users/migration.sql +50 -0
  193. package/prisma/migrations/20250306100801_templates_to_projects/migration.sql +244 -0
  194. package/prisma/migrations/20250306101814_cluster_naming_convention/migration.sql +2 -0
  195. package/prisma/migrations/migration_lock.toml +1 -1
  196. package/prisma/migrations_old/20231209164007_/migration.sql +8 -0
  197. package/prisma/migrations_old/20231209192452_country_table/migration.sql +7 -0
  198. package/prisma/migrations_old/20231209194848_/migration.sql +10 -0
  199. package/prisma/migrations_old/20231209195140_/migration.sql +8 -0
  200. package/prisma/migrations_old/20231209201218_country_update/migration.sql +29 -0
  201. package/prisma/migrations_old/20231209201405_/migration.sql +8 -0
  202. package/prisma/migrations_old/20231209213149_camusat_country/migration.sql +20 -0
  203. package/prisma/migrations_old/20231209221814_platform/migration.sql +26 -0
  204. package/prisma/migrations_old/20231209223246_/migration.sql +16 -0
  205. package/prisma/migrations_old/20231209231721_roles/migration.sql +34 -0
  206. package/prisma/migrations_old/20231210113501_team_and_users/migration.sql +119 -0
  207. package/prisma/migrations_old/20231210181832_user_update/migration.sql +25 -0
  208. package/prisma/migrations_old/20231219121311_add_projects/migration.sql +60 -0
  209. package/prisma/migrations_old/20231219123045_/migration.sql +8 -0
  210. package/prisma/migrations_old/20231219123850_audit/migration.sql +20 -0
  211. package/prisma/migrations_old/20240116090035_/migration.sql +57 -0
  212. package/prisma/migrations_old/20240220085809_emails/migration.sql +82 -0
  213. package/prisma/migrations_old/20240226075734_update_email_config_and_workorder/migration.sql +33 -0
  214. package/prisma/migrations_old/20240227112839_update_email_config/migration.sql +2 -0
  215. package/prisma/migrations_old/20240227124801_work_order_update/migration.sql +6 -0
  216. package/prisma/migrations_old/migration_lock.toml +3 -0
  217. package/prisma/schema.prisma +26 -2
  218. /package/prisma/{migrations → migrations_old}/20250121073034_homogenize_migrations/migration.sql +0 -0
@@ -0,0 +1,273 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `brand` on the `SpliceClosure` table. All the data in the column will be lost.
5
+ - You are about to drop the column `coordinates` on the `SpliceClosure` table. All the data in the column will be lost.
6
+ - You are about to drop the column `maxCapacity` on the `SpliceClosure` table. All the data in the column will be lost.
7
+ - You are about to drop the column `photo` on the `SpliceClosure` table. All the data in the column will be lost.
8
+ - You are about to drop the column `qrCode` on the `SpliceClosure` table. All the data in the column will be lost.
9
+
10
+ */
11
+ -- AlterTable
12
+ ALTER TABLE "SpliceClosure" DROP COLUMN "brand",
13
+ DROP COLUMN "coordinates",
14
+ DROP COLUMN "maxCapacity",
15
+ DROP COLUMN "photo",
16
+ DROP COLUMN "qrCode",
17
+ ADD COLUMN "attributes" JSONB,
18
+ ADD COLUMN "geometry" JSONB,
19
+ ADD COLUMN "photos" JSONB,
20
+ ADD COLUMN "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
21
+ ADD COLUMN "zone" JSONB;
22
+
23
+ -- CreateTable
24
+ CREATE TABLE "ZoneNro" (
25
+ "id" TEXT NOT NULL,
26
+ "no" SERIAL NOT NULL,
27
+ "status" TEXT NOT NULL DEFAULT 'active',
28
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
29
+ "photos" JSONB,
30
+ "zone" JSONB,
31
+ "geometry" JSONB,
32
+ "attributes" JSONB,
33
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
34
+ "updatedAt" TIMESTAMP(3) NOT NULL,
35
+ "deletedAt" TIMESTAMP(3),
36
+ "updatedById" TEXT,
37
+ "networkElementId" TEXT NOT NULL,
38
+ "projectId" TEXT,
39
+ "clusterId" TEXT,
40
+
41
+ CONSTRAINT "ZoneNro_pkey" PRIMARY KEY ("id")
42
+ );
43
+
44
+ -- CreateTable
45
+ CREATE TABLE "Pole" (
46
+ "id" TEXT NOT NULL,
47
+ "no" SERIAL NOT NULL,
48
+ "status" TEXT NOT NULL DEFAULT 'active',
49
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
50
+ "photos" JSONB,
51
+ "zone" JSONB,
52
+ "geometry" JSONB,
53
+ "attributes" JSONB,
54
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
55
+ "updatedAt" TIMESTAMP(3) NOT NULL,
56
+ "deletedAt" TIMESTAMP(3),
57
+ "updatedById" TEXT,
58
+ "networkElementId" TEXT NOT NULL,
59
+ "projectId" TEXT,
60
+ "clusterId" TEXT,
61
+
62
+ CONSTRAINT "Pole_pkey" PRIMARY KEY ("id")
63
+ );
64
+
65
+ -- CreateTable
66
+ CREATE TABLE "Manhole" (
67
+ "id" TEXT NOT NULL,
68
+ "no" SERIAL NOT NULL,
69
+ "status" TEXT NOT NULL DEFAULT 'active',
70
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
71
+ "photos" JSONB,
72
+ "zone" JSONB,
73
+ "geometry" JSONB,
74
+ "attributes" JSONB,
75
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
76
+ "updatedAt" TIMESTAMP(3) NOT NULL,
77
+ "deletedAt" TIMESTAMP(3),
78
+ "updatedById" TEXT,
79
+ "networkElementId" TEXT NOT NULL,
80
+ "projectId" TEXT,
81
+ "clusterId" TEXT,
82
+
83
+ CONSTRAINT "Manhole_pkey" PRIMARY KEY ("id")
84
+ );
85
+
86
+ -- CreateTable
87
+ CREATE TABLE "Loop" (
88
+ "id" TEXT NOT NULL,
89
+ "no" SERIAL NOT NULL,
90
+ "status" TEXT NOT NULL DEFAULT 'active',
91
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
92
+ "photos" JSONB,
93
+ "zone" JSONB,
94
+ "geometry" JSONB,
95
+ "attributes" JSONB,
96
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
97
+ "updatedAt" TIMESTAMP(3) NOT NULL,
98
+ "deletedAt" TIMESTAMP(3),
99
+ "updatedById" TEXT,
100
+ "networkElementId" TEXT NOT NULL,
101
+ "projectId" TEXT,
102
+ "clusterId" TEXT,
103
+
104
+ CONSTRAINT "Loop_pkey" PRIMARY KEY ("id")
105
+ );
106
+
107
+ -- CreateTable
108
+ CREATE TABLE "FDTSRO" (
109
+ "id" TEXT NOT NULL,
110
+ "no" SERIAL NOT NULL,
111
+ "status" TEXT NOT NULL DEFAULT 'active',
112
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
113
+ "photos" JSONB,
114
+ "zone" JSONB,
115
+ "geometry" JSONB,
116
+ "attributes" JSONB,
117
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
118
+ "updatedAt" TIMESTAMP(3) NOT NULL,
119
+ "deletedAt" TIMESTAMP(3),
120
+ "updatedById" TEXT,
121
+ "networkElementId" TEXT NOT NULL,
122
+ "projectId" TEXT,
123
+ "clusterId" TEXT,
124
+
125
+ CONSTRAINT "FDTSRO_pkey" PRIMARY KEY ("id")
126
+ );
127
+
128
+ -- CreateTable
129
+ CREATE TABLE "SFU" (
130
+ "id" TEXT NOT NULL,
131
+ "no" SERIAL NOT NULL,
132
+ "status" TEXT NOT NULL DEFAULT 'active',
133
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
134
+ "photos" JSONB,
135
+ "zone" JSONB,
136
+ "geometry" JSONB,
137
+ "attributes" JSONB,
138
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
139
+ "updatedAt" TIMESTAMP(3) NOT NULL,
140
+ "deletedAt" TIMESTAMP(3),
141
+ "updatedById" TEXT,
142
+ "networkElementId" TEXT NOT NULL,
143
+ "projectId" TEXT,
144
+ "clusterId" TEXT,
145
+
146
+ CONSTRAINT "SFU_pkey" PRIMARY KEY ("id")
147
+ );
148
+
149
+ -- CreateTable
150
+ CREATE TABLE "Building" (
151
+ "id" TEXT NOT NULL,
152
+ "no" SERIAL NOT NULL,
153
+ "status" TEXT NOT NULL DEFAULT 'active',
154
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
155
+ "photos" JSONB,
156
+ "zone" JSONB,
157
+ "geometry" JSONB,
158
+ "attributes" JSONB,
159
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
160
+ "updatedAt" TIMESTAMP(3) NOT NULL,
161
+ "deletedAt" TIMESTAMP(3),
162
+ "updatedById" TEXT,
163
+ "networkElementId" TEXT NOT NULL,
164
+ "projectId" TEXT,
165
+ "clusterId" TEXT,
166
+
167
+ CONSTRAINT "Building_pkey" PRIMARY KEY ("id")
168
+ );
169
+
170
+ -- CreateIndex
171
+ CREATE UNIQUE INDEX "ZoneNro_id_key" ON "ZoneNro"("id");
172
+
173
+ -- CreateIndex
174
+ CREATE UNIQUE INDEX "Pole_id_key" ON "Pole"("id");
175
+
176
+ -- CreateIndex
177
+ CREATE UNIQUE INDEX "Manhole_id_key" ON "Manhole"("id");
178
+
179
+ -- CreateIndex
180
+ CREATE UNIQUE INDEX "Loop_id_key" ON "Loop"("id");
181
+
182
+ -- CreateIndex
183
+ CREATE UNIQUE INDEX "FDTSRO_id_key" ON "FDTSRO"("id");
184
+
185
+ -- CreateIndex
186
+ CREATE UNIQUE INDEX "SFU_id_key" ON "SFU"("id");
187
+
188
+ -- CreateIndex
189
+ CREATE UNIQUE INDEX "Building_id_key" ON "Building"("id");
190
+
191
+ -- AddForeignKey
192
+ ALTER TABLE "ZoneNro" ADD CONSTRAINT "ZoneNro_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
193
+
194
+ -- AddForeignKey
195
+ ALTER TABLE "ZoneNro" ADD CONSTRAINT "ZoneNro_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
196
+
197
+ -- AddForeignKey
198
+ ALTER TABLE "ZoneNro" ADD CONSTRAINT "ZoneNro_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
199
+
200
+ -- AddForeignKey
201
+ ALTER TABLE "ZoneNro" ADD CONSTRAINT "ZoneNro_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
202
+
203
+ -- AddForeignKey
204
+ ALTER TABLE "Pole" ADD CONSTRAINT "Pole_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
205
+
206
+ -- AddForeignKey
207
+ ALTER TABLE "Pole" ADD CONSTRAINT "Pole_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
208
+
209
+ -- AddForeignKey
210
+ ALTER TABLE "Pole" ADD CONSTRAINT "Pole_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
211
+
212
+ -- AddForeignKey
213
+ ALTER TABLE "Pole" ADD CONSTRAINT "Pole_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
214
+
215
+ -- AddForeignKey
216
+ ALTER TABLE "Manhole" ADD CONSTRAINT "Manhole_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
217
+
218
+ -- AddForeignKey
219
+ ALTER TABLE "Manhole" ADD CONSTRAINT "Manhole_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
220
+
221
+ -- AddForeignKey
222
+ ALTER TABLE "Manhole" ADD CONSTRAINT "Manhole_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
223
+
224
+ -- AddForeignKey
225
+ ALTER TABLE "Manhole" ADD CONSTRAINT "Manhole_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
226
+
227
+ -- AddForeignKey
228
+ ALTER TABLE "Loop" ADD CONSTRAINT "Loop_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
229
+
230
+ -- AddForeignKey
231
+ ALTER TABLE "Loop" ADD CONSTRAINT "Loop_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
232
+
233
+ -- AddForeignKey
234
+ ALTER TABLE "Loop" ADD CONSTRAINT "Loop_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
235
+
236
+ -- AddForeignKey
237
+ ALTER TABLE "Loop" ADD CONSTRAINT "Loop_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
238
+
239
+ -- AddForeignKey
240
+ ALTER TABLE "FDTSRO" ADD CONSTRAINT "FDTSRO_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
241
+
242
+ -- AddForeignKey
243
+ ALTER TABLE "FDTSRO" ADD CONSTRAINT "FDTSRO_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
244
+
245
+ -- AddForeignKey
246
+ ALTER TABLE "FDTSRO" ADD CONSTRAINT "FDTSRO_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
247
+
248
+ -- AddForeignKey
249
+ ALTER TABLE "FDTSRO" ADD CONSTRAINT "FDTSRO_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
250
+
251
+ -- AddForeignKey
252
+ ALTER TABLE "SFU" ADD CONSTRAINT "SFU_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
253
+
254
+ -- AddForeignKey
255
+ ALTER TABLE "SFU" ADD CONSTRAINT "SFU_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
256
+
257
+ -- AddForeignKey
258
+ ALTER TABLE "SFU" ADD CONSTRAINT "SFU_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
259
+
260
+ -- AddForeignKey
261
+ ALTER TABLE "SFU" ADD CONSTRAINT "SFU_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
262
+
263
+ -- AddForeignKey
264
+ ALTER TABLE "Building" ADD CONSTRAINT "Building_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
265
+
266
+ -- AddForeignKey
267
+ ALTER TABLE "Building" ADD CONSTRAINT "Building_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
268
+
269
+ -- AddForeignKey
270
+ ALTER TABLE "Building" ADD CONSTRAINT "Building_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
271
+
272
+ -- AddForeignKey
273
+ ALTER TABLE "Building" ADD CONSTRAINT "Building_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "Cable" ADD COLUMN "coordinates" JSONB;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "CableTemplate" ADD COLUMN "coordinates" JSONB;
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "SpliceClosure" ADD COLUMN "projectId" TEXT;
3
+
4
+ -- AddForeignKey
5
+ ALTER TABLE "SpliceClosure" ADD CONSTRAINT "SpliceClosure_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "SpliceClosure" ADD COLUMN "clusterId" TEXT;
3
+
4
+ -- AddForeignKey
5
+ ALTER TABLE "SpliceClosure" ADD CONSTRAINT "SpliceClosure_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,295 @@
1
+ -- AlterTable
2
+ ALTER TABLE "SpliceClosureAttributes" ADD COLUMN "spliceClosureTemplateId" TEXT;
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "SpliceClosureTemplate" (
6
+ "id" TEXT NOT NULL,
7
+ "no" SERIAL NOT NULL,
8
+ "name" TEXT NOT NULL,
9
+ "status" TEXT NOT NULL DEFAULT 'active',
10
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
11
+ "photos" JSONB,
12
+ "zone" JSONB,
13
+ "geometry" JSONB,
14
+ "attributes" JSONB,
15
+ "description" TEXT,
16
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
17
+ "updatedAt" TIMESTAMP(3) NOT NULL,
18
+ "updatedById" TEXT,
19
+ "deletedAt" TIMESTAMP(3),
20
+ "networkElementId" TEXT NOT NULL,
21
+ "projectId" TEXT,
22
+ "clusterId" TEXT,
23
+
24
+ CONSTRAINT "SpliceClosureTemplate_pkey" PRIMARY KEY ("id")
25
+ );
26
+
27
+ -- CreateTable
28
+ CREATE TABLE "ZoneNroTemplate" (
29
+ "id" TEXT NOT NULL,
30
+ "no" SERIAL NOT NULL,
31
+ "status" TEXT NOT NULL DEFAULT 'active',
32
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
33
+ "photos" JSONB,
34
+ "zone" JSONB,
35
+ "geometry" JSONB,
36
+ "attributes" JSONB,
37
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
38
+ "updatedAt" TIMESTAMP(3) NOT NULL,
39
+ "deletedAt" TIMESTAMP(3),
40
+ "updatedById" TEXT,
41
+ "networkElementId" TEXT NOT NULL,
42
+ "projectId" TEXT,
43
+ "clusterId" TEXT,
44
+
45
+ CONSTRAINT "ZoneNroTemplate_pkey" PRIMARY KEY ("id")
46
+ );
47
+
48
+ -- CreateTable
49
+ CREATE TABLE "PoleTemplate" (
50
+ "id" TEXT NOT NULL,
51
+ "no" SERIAL NOT NULL,
52
+ "status" TEXT NOT NULL DEFAULT 'active',
53
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
54
+ "photos" JSONB,
55
+ "zone" JSONB,
56
+ "geometry" JSONB,
57
+ "attributes" JSONB,
58
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
59
+ "updatedAt" TIMESTAMP(3) NOT NULL,
60
+ "deletedAt" TIMESTAMP(3),
61
+ "updatedById" TEXT,
62
+ "networkElementId" TEXT NOT NULL,
63
+ "projectId" TEXT,
64
+ "clusterId" TEXT,
65
+
66
+ CONSTRAINT "PoleTemplate_pkey" PRIMARY KEY ("id")
67
+ );
68
+
69
+ -- CreateTable
70
+ CREATE TABLE "ManholeTemplate" (
71
+ "id" TEXT NOT NULL,
72
+ "no" SERIAL NOT NULL,
73
+ "status" TEXT NOT NULL DEFAULT 'active',
74
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
75
+ "photos" JSONB,
76
+ "zone" JSONB,
77
+ "geometry" JSONB,
78
+ "attributes" JSONB,
79
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
80
+ "updatedAt" TIMESTAMP(3) NOT NULL,
81
+ "deletedAt" TIMESTAMP(3),
82
+ "updatedById" TEXT,
83
+ "networkElementId" TEXT NOT NULL,
84
+ "projectId" TEXT,
85
+ "clusterId" TEXT,
86
+
87
+ CONSTRAINT "ManholeTemplate_pkey" PRIMARY KEY ("id")
88
+ );
89
+
90
+ -- CreateTable
91
+ CREATE TABLE "LoopTemplate" (
92
+ "id" TEXT NOT NULL,
93
+ "no" SERIAL NOT NULL,
94
+ "status" TEXT NOT NULL DEFAULT 'active',
95
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
96
+ "photos" JSONB,
97
+ "zone" JSONB,
98
+ "geometry" JSONB,
99
+ "attributes" JSONB,
100
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
101
+ "updatedAt" TIMESTAMP(3) NOT NULL,
102
+ "deletedAt" TIMESTAMP(3),
103
+ "updatedById" TEXT,
104
+ "networkElementId" TEXT NOT NULL,
105
+ "projectId" TEXT,
106
+ "clusterId" TEXT,
107
+
108
+ CONSTRAINT "LoopTemplate_pkey" PRIMARY KEY ("id")
109
+ );
110
+
111
+ -- CreateTable
112
+ CREATE TABLE "FDTSROTemplate" (
113
+ "id" TEXT NOT NULL,
114
+ "no" SERIAL NOT NULL,
115
+ "status" TEXT NOT NULL DEFAULT 'active',
116
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
117
+ "photos" JSONB,
118
+ "zone" JSONB,
119
+ "geometry" JSONB,
120
+ "attributes" JSONB,
121
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
122
+ "updatedAt" TIMESTAMP(3) NOT NULL,
123
+ "deletedAt" TIMESTAMP(3),
124
+ "updatedById" TEXT,
125
+ "networkElementId" TEXT NOT NULL,
126
+ "projectId" TEXT,
127
+ "clusterId" TEXT,
128
+
129
+ CONSTRAINT "FDTSROTemplate_pkey" PRIMARY KEY ("id")
130
+ );
131
+
132
+ -- CreateTable
133
+ CREATE TABLE "SFUTemplate" (
134
+ "id" TEXT NOT NULL,
135
+ "no" SERIAL NOT NULL,
136
+ "status" TEXT NOT NULL DEFAULT 'active',
137
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
138
+ "photos" JSONB,
139
+ "zone" JSONB,
140
+ "geometry" JSONB,
141
+ "attributes" JSONB,
142
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
143
+ "updatedAt" TIMESTAMP(3) NOT NULL,
144
+ "deletedAt" TIMESTAMP(3),
145
+ "updatedById" TEXT,
146
+ "networkElementId" TEXT NOT NULL,
147
+ "projectId" TEXT,
148
+ "clusterId" TEXT,
149
+
150
+ CONSTRAINT "SFUTemplate_pkey" PRIMARY KEY ("id")
151
+ );
152
+
153
+ -- CreateTable
154
+ CREATE TABLE "BuildingTemplate" (
155
+ "id" TEXT NOT NULL,
156
+ "no" SERIAL NOT NULL,
157
+ "status" TEXT NOT NULL DEFAULT 'active',
158
+ "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
159
+ "photos" JSONB,
160
+ "zone" JSONB,
161
+ "geometry" JSONB,
162
+ "attributes" JSONB,
163
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
164
+ "updatedAt" TIMESTAMP(3) NOT NULL,
165
+ "deletedAt" TIMESTAMP(3),
166
+ "updatedById" TEXT,
167
+ "networkElementId" TEXT NOT NULL,
168
+ "projectId" TEXT,
169
+ "clusterId" TEXT,
170
+
171
+ CONSTRAINT "BuildingTemplate_pkey" PRIMARY KEY ("id")
172
+ );
173
+
174
+ -- CreateIndex
175
+ CREATE UNIQUE INDEX "SpliceClosureTemplate_id_key" ON "SpliceClosureTemplate"("id");
176
+
177
+ -- CreateIndex
178
+ CREATE UNIQUE INDEX "ZoneNroTemplate_id_key" ON "ZoneNroTemplate"("id");
179
+
180
+ -- CreateIndex
181
+ CREATE UNIQUE INDEX "PoleTemplate_id_key" ON "PoleTemplate"("id");
182
+
183
+ -- CreateIndex
184
+ CREATE UNIQUE INDEX "ManholeTemplate_id_key" ON "ManholeTemplate"("id");
185
+
186
+ -- CreateIndex
187
+ CREATE UNIQUE INDEX "LoopTemplate_id_key" ON "LoopTemplate"("id");
188
+
189
+ -- CreateIndex
190
+ CREATE UNIQUE INDEX "FDTSROTemplate_id_key" ON "FDTSROTemplate"("id");
191
+
192
+ -- CreateIndex
193
+ CREATE UNIQUE INDEX "SFUTemplate_id_key" ON "SFUTemplate"("id");
194
+
195
+ -- CreateIndex
196
+ CREATE UNIQUE INDEX "BuildingTemplate_id_key" ON "BuildingTemplate"("id");
197
+
198
+ -- AddForeignKey
199
+ ALTER TABLE "SpliceClosureTemplate" ADD CONSTRAINT "SpliceClosureTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
200
+
201
+ -- AddForeignKey
202
+ ALTER TABLE "SpliceClosureTemplate" ADD CONSTRAINT "SpliceClosureTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
203
+
204
+ -- AddForeignKey
205
+ ALTER TABLE "SpliceClosureTemplate" ADD CONSTRAINT "SpliceClosureTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
206
+
207
+ -- AddForeignKey
208
+ ALTER TABLE "SpliceClosureTemplate" ADD CONSTRAINT "SpliceClosureTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
209
+
210
+ -- AddForeignKey
211
+ ALTER TABLE "SpliceClosureAttributes" ADD CONSTRAINT "SpliceClosureAttributes_spliceClosureTemplateId_fkey" FOREIGN KEY ("spliceClosureTemplateId") REFERENCES "SpliceClosureTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
212
+
213
+ -- AddForeignKey
214
+ ALTER TABLE "ZoneNroTemplate" ADD CONSTRAINT "ZoneNroTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
215
+
216
+ -- AddForeignKey
217
+ ALTER TABLE "ZoneNroTemplate" ADD CONSTRAINT "ZoneNroTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
218
+
219
+ -- AddForeignKey
220
+ ALTER TABLE "ZoneNroTemplate" ADD CONSTRAINT "ZoneNroTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
221
+
222
+ -- AddForeignKey
223
+ ALTER TABLE "ZoneNroTemplate" ADD CONSTRAINT "ZoneNroTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
224
+
225
+ -- AddForeignKey
226
+ ALTER TABLE "PoleTemplate" ADD CONSTRAINT "PoleTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
227
+
228
+ -- AddForeignKey
229
+ ALTER TABLE "PoleTemplate" ADD CONSTRAINT "PoleTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
230
+
231
+ -- AddForeignKey
232
+ ALTER TABLE "PoleTemplate" ADD CONSTRAINT "PoleTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
233
+
234
+ -- AddForeignKey
235
+ ALTER TABLE "PoleTemplate" ADD CONSTRAINT "PoleTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
236
+
237
+ -- AddForeignKey
238
+ ALTER TABLE "ManholeTemplate" ADD CONSTRAINT "ManholeTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
239
+
240
+ -- AddForeignKey
241
+ ALTER TABLE "ManholeTemplate" ADD CONSTRAINT "ManholeTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
242
+
243
+ -- AddForeignKey
244
+ ALTER TABLE "ManholeTemplate" ADD CONSTRAINT "ManholeTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
245
+
246
+ -- AddForeignKey
247
+ ALTER TABLE "ManholeTemplate" ADD CONSTRAINT "ManholeTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
248
+
249
+ -- AddForeignKey
250
+ ALTER TABLE "LoopTemplate" ADD CONSTRAINT "LoopTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
251
+
252
+ -- AddForeignKey
253
+ ALTER TABLE "LoopTemplate" ADD CONSTRAINT "LoopTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
254
+
255
+ -- AddForeignKey
256
+ ALTER TABLE "LoopTemplate" ADD CONSTRAINT "LoopTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
257
+
258
+ -- AddForeignKey
259
+ ALTER TABLE "LoopTemplate" ADD CONSTRAINT "LoopTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
260
+
261
+ -- AddForeignKey
262
+ ALTER TABLE "FDTSROTemplate" ADD CONSTRAINT "FDTSROTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
263
+
264
+ -- AddForeignKey
265
+ ALTER TABLE "FDTSROTemplate" ADD CONSTRAINT "FDTSROTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
266
+
267
+ -- AddForeignKey
268
+ ALTER TABLE "FDTSROTemplate" ADD CONSTRAINT "FDTSROTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
269
+
270
+ -- AddForeignKey
271
+ ALTER TABLE "FDTSROTemplate" ADD CONSTRAINT "FDTSROTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
272
+
273
+ -- AddForeignKey
274
+ ALTER TABLE "SFUTemplate" ADD CONSTRAINT "SFUTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
275
+
276
+ -- AddForeignKey
277
+ ALTER TABLE "SFUTemplate" ADD CONSTRAINT "SFUTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
278
+
279
+ -- AddForeignKey
280
+ ALTER TABLE "SFUTemplate" ADD CONSTRAINT "SFUTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
281
+
282
+ -- AddForeignKey
283
+ ALTER TABLE "SFUTemplate" ADD CONSTRAINT "SFUTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
284
+
285
+ -- AddForeignKey
286
+ ALTER TABLE "BuildingTemplate" ADD CONSTRAINT "BuildingTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
287
+
288
+ -- AddForeignKey
289
+ ALTER TABLE "BuildingTemplate" ADD CONSTRAINT "BuildingTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
290
+
291
+ -- AddForeignKey
292
+ ALTER TABLE "BuildingTemplate" ADD CONSTRAINT "BuildingTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
293
+
294
+ -- AddForeignKey
295
+ ALTER TABLE "BuildingTemplate" ADD CONSTRAINT "BuildingTemplate_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,50 @@
1
+ -- AlterTable
2
+ ALTER TABLE "Building" ADD COLUMN "name" TEXT;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "BuildingTemplate" ADD COLUMN "name" TEXT;
6
+
7
+ -- AlterTable
8
+ ALTER TABLE "FDTSRO" ADD COLUMN "name" TEXT;
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "FDTSROTemplate" ADD COLUMN "name" TEXT;
12
+
13
+ -- AlterTable
14
+ ALTER TABLE "Loop" ADD COLUMN "name" TEXT;
15
+
16
+ -- AlterTable
17
+ ALTER TABLE "LoopTemplate" ADD COLUMN "name" TEXT;
18
+
19
+ -- AlterTable
20
+ ALTER TABLE "Manhole" ADD COLUMN "name" TEXT;
21
+
22
+ -- AlterTable
23
+ ALTER TABLE "ManholeTemplate" ADD COLUMN "name" TEXT;
24
+
25
+ -- AlterTable
26
+ ALTER TABLE "PboFat" ADD COLUMN "name" TEXT;
27
+
28
+ -- AlterTable
29
+ ALTER TABLE "Pole" ADD COLUMN "name" TEXT;
30
+
31
+ -- AlterTable
32
+ ALTER TABLE "PoleTemplate" ADD COLUMN "name" TEXT;
33
+
34
+ -- AlterTable
35
+ ALTER TABLE "SFU" ADD COLUMN "name" TEXT;
36
+
37
+ -- AlterTable
38
+ ALTER TABLE "SFUTemplate" ADD COLUMN "name" TEXT;
39
+
40
+ -- AlterTable
41
+ ALTER TABLE "SpliceClosure" ALTER COLUMN "name" DROP NOT NULL;
42
+
43
+ -- AlterTable
44
+ ALTER TABLE "SpliceClosureTemplate" ALTER COLUMN "name" DROP NOT NULL;
45
+
46
+ -- AlterTable
47
+ ALTER TABLE "ZoneNro" ADD COLUMN "name" TEXT;
48
+
49
+ -- AlterTable
50
+ ALTER TABLE "ZoneNroTemplate" ADD COLUMN "name" TEXT;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "EmailTemplates" ADD COLUMN "carbonCopyList" JSONB;