efiber-prisma-schema 1.10.4 → 1.10.6

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 (240) hide show
  1. package/package.json +1 -1
  2. package/prisma/migrations/0_init/migration.sql +0 -0
  3. package/prisma/migrations/20231209164007_/migration.sql +0 -0
  4. package/prisma/migrations/20231209192452_country_table/migration.sql +0 -0
  5. package/prisma/migrations/20231209194848_/migration.sql +0 -0
  6. package/prisma/migrations/20231209195140_/migration.sql +0 -0
  7. package/prisma/migrations/20231209201218_country_update/migration.sql +0 -0
  8. package/prisma/migrations/20231209201405_/migration.sql +0 -0
  9. package/prisma/migrations/20231209213149_camusat_country/migration.sql +0 -0
  10. package/prisma/migrations/20231209221814_platform/migration.sql +0 -0
  11. package/prisma/migrations/20231209223246_/migration.sql +0 -0
  12. package/prisma/migrations/20231209231721_roles/migration.sql +0 -0
  13. package/prisma/migrations/20231210113501_team_and_users/migration.sql +0 -0
  14. package/prisma/migrations/20231210181832_user_update/migration.sql +0 -0
  15. package/prisma/migrations/20231219121311_add_projects/migration.sql +0 -0
  16. package/prisma/migrations/20231219123045_/migration.sql +0 -0
  17. package/prisma/migrations/20231219123850_audit/migration.sql +0 -0
  18. package/prisma/migrations/20240116090035_/migration.sql +0 -0
  19. package/prisma/migrations/20240202082320_init/migration.sql +17 -0
  20. package/prisma/migrations/20240202091027_camusat_client/migration.sql +29 -0
  21. package/prisma/migrations/20240202124330_camusatcountry/migration.sql +20 -0
  22. package/prisma/migrations/20240203085209_feature/migration.sql +66 -0
  23. package/prisma/migrations/20240203123342_feature/migration.sql +38 -0
  24. package/prisma/migrations/20240203124454_featuretype/migration.sql +30 -0
  25. package/prisma/migrations/20240203134414_featuretype/migration.sql +8 -0
  26. package/prisma/migrations/20240203154141_featuretype/migration.sql +47 -0
  27. package/prisma/migrations/20240203203915_template/migration.sql +82 -0
  28. package/prisma/migrations/20240204040725_template_component/migration.sql +83 -0
  29. package/prisma/migrations/20240204043127_template_component/migration.sql +3 -0
  30. package/prisma/migrations/20240204051036_template_component/migration.sql +17 -0
  31. package/prisma/migrations/20240204052923_template_component/migration.sql +24 -0
  32. package/prisma/migrations/20240204103902_template_component/migration.sql +10 -0
  33. package/prisma/migrations/20240204112656_camusat_client/migration.sql +13 -0
  34. package/prisma/migrations/20240204113143_camusat_client/migration.sql +16 -0
  35. package/prisma/migrations/20240204133932_camusat_client/migration.sql +13 -0
  36. package/prisma/migrations/20240204134637_camusat_client/migration.sql +16 -0
  37. package/prisma/migrations/20240204135459_camusat_client/migration.sql +8 -0
  38. package/prisma/migrations/20240204135615_camusat_client/migration.sql +16 -0
  39. package/prisma/migrations/20240204141001_camusat_client/migration.sql +16 -0
  40. package/prisma/migrations/20240205070804_template/migration.sql +60 -0
  41. package/prisma/migrations/20240205071138_template/migration.sql +8 -0
  42. package/prisma/migrations/20240205074015_template/migration.sql +11 -0
  43. package/prisma/migrations/20240205100949_template/migration.sql +3 -0
  44. package/prisma/migrations/20240205170632_template/migration.sql +26 -0
  45. package/prisma/migrations/20240205171038_template/migration.sql +8 -0
  46. package/prisma/migrations/20240206115225_template/migration.sql +2 -0
  47. package/prisma/migrations/20240206115743_template/migration.sql +8 -0
  48. package/prisma/migrations/20240206122145_template/migration.sql +8 -0
  49. package/prisma/migrations/20240206122530_template/migration.sql +17 -0
  50. package/prisma/migrations/20240206124010_template/migration.sql +2 -0
  51. package/prisma/migrations/20240206124504_template/migration.sql +8 -0
  52. package/prisma/migrations/20240207123737_template_component/migration.sql +27 -0
  53. package/prisma/migrations/20240207182427_project_workflow/migration.sql +13 -0
  54. package/prisma/migrations/20240208080438_project_workflow/migration.sql +29 -0
  55. package/prisma/migrations/20240208094341_project_workflow/migration.sql +20 -0
  56. package/prisma/migrations/20240208094513_project_workflow/migration.sql +11 -0
  57. package/prisma/migrations/20240208110543_feature/migration.sql +42 -0
  58. package/prisma/migrations/20240209094123_feature/migration.sql +2 -0
  59. package/prisma/migrations/20240211174122_camusat_client/migration.sql +2 -0
  60. package/prisma/migrations/20240219060721_feature/migration.sql +14 -0
  61. package/prisma/migrations/20240220085809_emails/migration.sql +0 -0
  62. package/prisma/migrations/20240226075734_update_email_config_and_workorder/migration.sql +0 -0
  63. package/prisma/migrations/20240227112839_update_email_config/migration.sql +0 -0
  64. package/prisma/migrations/20240227124801_work_order_update/migration.sql +0 -0
  65. package/prisma/migrations/20240301063634_material/migration.sql +40 -0
  66. package/prisma/migrations/20240301064450_material/migration.sql +8 -0
  67. package/prisma/migrations/20240301071914_bill_of_material/migration.sql +32 -0
  68. package/prisma/migrations/20240301130744_dispatch_material/migration.sql +19 -0
  69. package/prisma/migrations/20240304051150_dispatch_material/migration.sql +5 -0
  70. package/prisma/migrations/20240304060722_dispatch_material/migration.sql +5 -0
  71. package/prisma/migrations/20240304060902_dispatch_material/migration.sql +8 -0
  72. package/prisma/migrations/20240304061156_dispatch_material/migration.sql +9 -0
  73. package/prisma/migrations/20240304173952_stock_movement/migration.sql +40 -0
  74. package/prisma/migrations/20240305072137_stock_movement/migration.sql +239 -0
  75. package/prisma/migrations/20240305072744_stock_movement/migration.sql +12 -0
  76. package/prisma/migrations/20240306055959_stock_movement/migration.sql +11 -0
  77. package/prisma/migrations/20240306062724_stock_movement/migration.sql +2 -0
  78. package/prisma/migrations/20240306113309_stock_movement/migration.sql +8 -0
  79. package/prisma/migrations/20240306141448_stock_movement/migration.sql +5 -0
  80. package/prisma/migrations/20240306144254_stock_movement/migration.sql +5 -0
  81. package/prisma/migrations/20240306154800_stock_movement/migration.sql +8 -0
  82. package/prisma/migrations/20240307095205_stock_movement/migration.sql +16 -0
  83. package/prisma/migrations/20240308175028_new/migration.sql +8 -0
  84. package/prisma/migrations/20240310114206_dispatch_project/migration.sql +5 -0
  85. package/prisma/migrations/20240311121226_new/migration.sql +71 -0
  86. package/prisma/migrations/20240311171024_new/migration.sql +8 -0
  87. package/prisma/migrations/20240312090511_material/migration.sql +17 -0
  88. package/prisma/migrations/20240312095600_material/migration.sql +16 -0
  89. package/prisma/migrations/20240312115431_material/migration.sql +11 -0
  90. package/prisma/migrations/20240316161358_work_order/migration.sql +3 -0
  91. package/prisma/migrations/20240318112352_problem_categorization/migration.sql +14 -0
  92. package/prisma/migrations/20240318112616_problem_categorization/migration.sql +8 -0
  93. package/prisma/migrations/20240319072457_work_order/migration.sql +5 -0
  94. package/prisma/migrations/20240320124008_dispatch_project/migration.sql +26 -0
  95. package/prisma/migrations/20240321081929_dispatch_project/migration.sql +8 -0
  96. package/prisma/migrations/20240321102139_work_order/migration.sql +45 -0
  97. package/prisma/migrations/20240321103420_work_order/migration.sql +14 -0
  98. package/prisma/migrations/20240321103537_work_order/migration.sql +2 -0
  99. package/prisma/migrations/20240322061027_material/migration.sql +11 -0
  100. package/prisma/migrations/20240323122952_work_order/migration.sql +6 -0
  101. package/prisma/migrations/20240323125822_work_order/migration.sql +2 -0
  102. package/prisma/migrations/20240325082900_work_order/migration.sql +11 -0
  103. package/prisma/migrations/20240326115608_work_order/migration.sql +18 -0
  104. package/prisma/migrations/20240327051438_work_order/migration.sql +8 -0
  105. package/prisma/migrations/20240327100905_work_order/migration.sql +24 -0
  106. package/prisma/migrations/20240328121421_work_order/migration.sql +26 -0
  107. package/prisma/migrations/20240328122320_work_order/migration.sql +9 -0
  108. package/prisma/migrations/20240328123833_work_order/migration.sql +3 -0
  109. package/prisma/migrations/20240328132921_work_order/migration.sql +5 -0
  110. package/prisma/migrations/20240328142205_work_order/migration.sql +2 -0
  111. package/prisma/migrations/20240401184203_billof_material/migration.sql +8 -0
  112. package/prisma/migrations/20240402125649_feature/migration.sql +2 -0
  113. package/prisma/migrations/20240404054220_project/migration.sql +29 -0
  114. package/prisma/migrations/20240407224722_user/migration.sql +2 -0
  115. package/prisma/migrations/20240408100730_template_component/migration.sql +12 -0
  116. package/prisma/migrations/20240409094754_template/migration.sql +2 -0
  117. package/prisma/migrations/20240409095653_template/migration.sql +2 -0
  118. package/prisma/migrations/20240409100032_features/migration.sql +2 -0
  119. package/prisma/migrations/20240409100313_project/migration.sql +5 -0
  120. package/prisma/migrations/20240411073053_subject_email_configurations/migration.sql +2 -0
  121. package/prisma/migrations/20240412093517_work_order_tasks/migration.sql +3 -0
  122. package/prisma/migrations/20240413085449_problem_categorization/migration.sql +5 -0
  123. package/prisma/migrations/20240415101559_project/migration.sql +20 -0
  124. package/prisma/migrations/20240417062104_sync_to_git/migration.sql +122 -0
  125. package/prisma/migrations/20240417125606_workorder/migration.sql +2 -0
  126. package/prisma/migrations/20240422112728_movement_logs/migration.sql +17 -0
  127. package/prisma/migrations/20240423100846_work_order_task/migration.sql +3 -0
  128. package/prisma/migrations/20240428163748_email_count/migration.sql +6 -0
  129. package/prisma/migrations/20240430112607_work_order_edit_logs/migration.sql +25 -0
  130. package/prisma/migrations/20240502051952_template_status_color/migration.sql +2 -0
  131. package/prisma/migrations/20240506195539_projecttypes/migration.sql +29 -0
  132. package/prisma/migrations/20240508074229_workorder_task/migration.sql +2 -0
  133. package/prisma/migrations/20240515065236_coms/migration.sql +21 -0
  134. package/prisma/migrations/20240516093046_subsidiary_prefix/migration.sql +2 -0
  135. package/prisma/migrations/20240516170701_/migration.sql +9 -0
  136. package/prisma/migrations/20240520093356_emailconfig/migration.sql +13 -0
  137. package/prisma/migrations/20240530093136_emailtemplates/migration.sql +24 -0
  138. package/prisma/migrations/20240530110729_emailtemplates/migration.sql +4 -0
  139. package/prisma/migrations/20240530113416_emailtemplates/migration.sql +9 -0
  140. package/prisma/migrations/20240605072947_audit/migration.sql +2 -0
  141. package/prisma/migrations/20240605130105_notification_tokens/migration.sql +2 -0
  142. package/prisma/migrations/20240606074325_notifications/migration.sql +21 -0
  143. package/prisma/migrations/20240606074819_notif2/migration.sql +8 -0
  144. package/prisma/migrations/20240606172109_excel_config/migration.sql +2 -0
  145. package/prisma/migrations/20240607094457_reportformats/migration.sql +27 -0
  146. package/prisma/migrations/20240611101040_audit_matrices/migration.sql +2 -0
  147. package/prisma/migrations/20240611102951_workorder_audit_matrix/migration.sql +2 -0
  148. package/prisma/migrations/20240613063600_dispatch_roles/migration.sql +18 -0
  149. package/prisma/migrations/20240613071005_permissions_view_schedule/migration.sql +2 -0
  150. package/prisma/migrations/20240703093757_email_templates_templateinfo/migration.sql +2 -0
  151. package/prisma/migrations/20240715124159_mainproject_roles/migration.sql +5 -0
  152. package/prisma/migrations/20240722073020_admin_permissions_update/migration.sql +4 -0
  153. package/prisma/migrations/20240722082135_edit_projects/migration.sql +2 -0
  154. package/prisma/migrations/20240726090437_user_refresh_token/migration.sql +11 -0
  155. package/prisma/migrations/20240729135109_project_workflow_edit/migration.sql +2 -0
  156. package/prisma/migrations/20240729140705_template_component_project_index/migration.sql +2 -0
  157. package/prisma/migrations/20240731061332_report_format_bom_info/migration.sql +2 -0
  158. package/prisma/migrations/20240805073630_user_platform_relationship/migration.sql +17 -0
  159. package/prisma/migrations/20240809075746_workorder_sla/migration.sql +2 -0
  160. package/prisma/migrations/20240814094717_platform_to_project/migration.sql +17 -0
  161. package/prisma/migrations/20240814102025_platforms_to_project/migration.sql +8 -0
  162. package/prisma/migrations/20240819093908_network_elements/migration.sql +239 -0
  163. package/prisma/migrations/20240820092024_network_element_attributes/migration.sql +276 -0
  164. package/prisma/migrations/20240826083231_fat_template/migration.sql +45 -0
  165. package/prisma/migrations/20240826085204_pbo_pbo_template_to_project/migration.sql +23 -0
  166. package/prisma/migrations/20240826091924_attributes_to_fat_optional/migration.sql +15 -0
  167. package/prisma/migrations/20240902094457_email_signature/migration.sql +2 -0
  168. package/prisma/migrations/20240904092123_pbo_fat_zone_geometry/migration.sql +16 -0
  169. package/prisma/migrations/20240905125754_fat_name_attributes/migration.sql +3 -0
  170. package/prisma/migrations/20240905131742_fat_attribute_visible_on_mobile/migration.sql +2 -0
  171. package/prisma/migrations/20240911083041_country_list_user/migration.sql +17 -0
  172. package/prisma/migrations/20240911135957_actiondate_workorder_activity_log/migration.sql +2 -0
  173. package/prisma/migrations/20240911140227_workorder_activity_log_action_date_string_to_datetime/migration.sql +9 -0
  174. package/prisma/migrations/20240916130344_cable_template/migration.sql +72 -0
  175. package/prisma/migrations/20240916132002_cable_terminal_access/migration.sql +5 -0
  176. package/prisma/migrations/20240917113037_cable_id_on_cable_attributes_optional/migration.sql +8 -0
  177. package/prisma/migrations/20240917114004_visible_on_mobile_cable_attributes/migration.sql +2 -0
  178. package/prisma/migrations/20240917114107_visible_on_mobile_cable_attributes/migration.sql +9 -0
  179. package/prisma/migrations/20240919080014_create_cluster_and_central_office_tables/migration.sql +54 -0
  180. package/prisma/migrations/20240920092832_create_qr_code/migration.sql +39 -0
  181. package/prisma/migrations/20240924121308_qrcode_tag/migration.sql +23 -0
  182. package/prisma/migrations/20241003093709_integration_login_permissions/migration.sql +3 -0
  183. package/prisma/migrations/20241024090904_project_phase/migration.sql +2 -0
  184. package/prisma/migrations/20241024115650_project_phase_log/migration.sql +24 -0
  185. package/prisma/migrations/20241026095632_pbo_fat_attributes/migration.sql +2 -0
  186. package/prisma/migrations/20241028095307_qr_code_template_i_ds/migration.sql +9 -0
  187. package/prisma/migrations/20241029081315_add_more_network_elements/migration.sql +273 -0
  188. package/prisma/migrations/20241029084826_cable_coordinates/migration.sql +5 -0
  189. package/prisma/migrations/20241029092244_splice_closure_to_project/migration.sql +5 -0
  190. package/prisma/migrations/20241029092705_splice_closure_to_cluster/migration.sql +5 -0
  191. package/prisma/migrations/20241029094049_network_element_templates/migration.sql +295 -0
  192. package/prisma/migrations/20241029102645_network_elements_name/migration.sql +50 -0
  193. package/prisma/migrations/20241102074544_mail_carboncopy_list/migration.sql +2 -0
  194. package/prisma/migrations/20241104114549_change_qr_code_to_qr_code_template/migration.sql +122 -0
  195. package/prisma/migrations/20241104121110_qr_code_template_to_network_element_template/migration.sql +33 -0
  196. package/prisma/migrations/20241106101316_zone_coordinates/migration.sql +5 -0
  197. package/prisma/migrations/20241201141127_auto_name_elements/migration.sql +39 -0
  198. package/prisma/migrations/20241201144124_auto_name_element/migration.sql +39 -0
  199. package/prisma/migrations/20241201150401_template_index/migration.sql +29 -0
  200. package/prisma/migrations/20241205084445_template_id/migration.sql +59 -0
  201. package/prisma/migrations/20241205093552_integration_project_user_status/migration.sql +23 -0
  202. package/prisma/migrations/20241211093653_installation_sequence/migration.sql +90 -0
  203. package/prisma/migrations/20241211150807_installation_index/migration.sql +2 -0
  204. package/prisma/migrations/20241217082800_cluster_boundary/migration.sql +3 -0
  205. package/prisma/migrations/20250114092907_workorder_to_pbo_fat/migration.sql +5 -0
  206. package/prisma/migrations/20250114112746_workorder_to_sfu_and_building/migration.sql +9 -0
  207. package/prisma/migrations/20250211070850_networkelement_sequence/migration.sql +19 -0
  208. package/prisma/migrations/20250211072332_refresh_db/migration.sql +95 -0
  209. package/prisma/migrations/20250211080946_installation_sequence_self_relation/migration.sql +6 -0
  210. package/prisma/migrations/20250220100853_cluster_to_user_status/migration.sql +32 -0
  211. package/prisma/migrations/20250228100106_qr_code_template_to_cluster/migration.sql +5 -0
  212. package/prisma/migrations/20250304155122_clusters_to_users_centraloffices_to_users/migration.sql +50 -0
  213. package/prisma/migrations/20250306100801_templates_to_projects/migration.sql +244 -0
  214. package/prisma/migrations/20250306101814_cluster_naming_convention/migration.sql +2 -0
  215. package/prisma/migrations/20250311083647_previous_equipment/migration.sql +28 -0
  216. package/prisma/migrations/20250311141713_make_qrcode_template_prefix_unique/migration.sql +8 -0
  217. package/prisma/migrations/migration_lock.toml +1 -1
  218. package/prisma/migrations_old/20231209164007_/migration.sql +8 -0
  219. package/prisma/migrations_old/20231209192452_country_table/migration.sql +7 -0
  220. package/prisma/migrations_old/20231209194848_/migration.sql +10 -0
  221. package/prisma/migrations_old/20231209195140_/migration.sql +8 -0
  222. package/prisma/migrations_old/20231209201218_country_update/migration.sql +29 -0
  223. package/prisma/migrations_old/20231209201405_/migration.sql +8 -0
  224. package/prisma/migrations_old/20231209213149_camusat_country/migration.sql +20 -0
  225. package/prisma/migrations_old/20231209221814_platform/migration.sql +26 -0
  226. package/prisma/migrations_old/20231209223246_/migration.sql +16 -0
  227. package/prisma/migrations_old/20231209231721_roles/migration.sql +34 -0
  228. package/prisma/migrations_old/20231210113501_team_and_users/migration.sql +119 -0
  229. package/prisma/migrations_old/20231210181832_user_update/migration.sql +25 -0
  230. package/prisma/migrations_old/20231219121311_add_projects/migration.sql +60 -0
  231. package/prisma/migrations_old/20231219123045_/migration.sql +8 -0
  232. package/prisma/migrations_old/20231219123850_audit/migration.sql +20 -0
  233. package/prisma/migrations_old/20240116090035_/migration.sql +57 -0
  234. package/prisma/migrations_old/20240220085809_emails/migration.sql +82 -0
  235. package/prisma/migrations_old/20240226075734_update_email_config_and_workorder/migration.sql +33 -0
  236. package/prisma/migrations_old/20240227112839_update_email_config/migration.sql +2 -0
  237. package/prisma/migrations_old/20240227124801_work_order_update/migration.sql +6 -0
  238. package/prisma/migrations_old/migration_lock.toml +3 -0
  239. package/prisma/schema.prisma +31 -3
  240. /package/prisma/{migrations → migrations_old}/20250121073034_homogenize_migrations/migration.sql +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efiber-prisma-schema",
3
- "version": "1.10.4",
3
+ "version": "1.10.6",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,17 @@
1
+ -- CreateTable
2
+ CREATE TABLE "Client" (
3
+ "id" TEXT NOT NULL,
4
+ "name" TEXT NOT NULL,
5
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
6
+ "updatedAt" TIMESTAMP(3) NOT NULL,
7
+ "deletedAt" TIMESTAMP(3),
8
+ "countryId" TEXT NOT NULL,
9
+
10
+ CONSTRAINT "Client_pkey" PRIMARY KEY ("id")
11
+ );
12
+
13
+ -- CreateIndex
14
+ CREATE UNIQUE INDEX "Client_id_key" ON "Client"("id");
15
+
16
+ -- AddForeignKey
17
+ ALTER TABLE "Client" ADD CONSTRAINT "Client_countryId_fkey" FOREIGN KEY ("countryId") REFERENCES "CamusatCountry"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,29 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `Client` table. If the table is not empty, all the data it contains will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE "Client" DROP CONSTRAINT "Client_countryId_fkey";
9
+
10
+ -- DropTable
11
+ DROP TABLE "Client";
12
+
13
+ -- CreateTable
14
+ CREATE TABLE "CamusatClient" (
15
+ "id" TEXT NOT NULL,
16
+ "name" TEXT NOT NULL,
17
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
18
+ "updatedAt" TIMESTAMP(3) NOT NULL,
19
+ "deletedAt" TIMESTAMP(3),
20
+ "countryId" TEXT NOT NULL,
21
+
22
+ CONSTRAINT "CamusatClient_pkey" PRIMARY KEY ("id")
23
+ );
24
+
25
+ -- CreateIndex
26
+ CREATE UNIQUE INDEX "CamusatClient_id_key" ON "CamusatClient"("id");
27
+
28
+ -- AddForeignKey
29
+ ALTER TABLE "CamusatClient" ADD CONSTRAINT "CamusatClient_countryId_fkey" FOREIGN KEY ("countryId") REFERENCES "CamusatCountry"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,20 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `countryId` on the `CamusatClient` table. All the data in the column will be lost.
5
+ - A unique constraint covering the columns `[name]` on the table `CamusatCountry` will be added. If there are existing duplicate values, this will fail.
6
+ - Added the required column `countryName` to the `CamusatClient` table without a default value. This is not possible if the table is not empty.
7
+
8
+ */
9
+ -- DropForeignKey
10
+ ALTER TABLE "CamusatClient" DROP CONSTRAINT "CamusatClient_countryId_fkey";
11
+
12
+ -- AlterTable
13
+ ALTER TABLE "CamusatClient" DROP COLUMN "countryId",
14
+ ADD COLUMN "countryName" TEXT NOT NULL;
15
+
16
+ -- CreateIndex
17
+ CREATE UNIQUE INDEX "CamusatCountry_name_key" ON "CamusatCountry"("name");
18
+
19
+ -- AddForeignKey
20
+ ALTER TABLE "CamusatClient" ADD CONSTRAINT "CamusatClient_countryName_fkey" FOREIGN KEY ("countryName") REFERENCES "CamusatCountry"("name") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,66 @@
1
+ -- CreateTable
2
+ CREATE TABLE "Template" (
3
+ "id" TEXT NOT NULL,
4
+ "name" TEXT NOT NULL,
5
+ "buttonName" TEXT NOT NULL,
6
+
7
+ CONSTRAINT "Template_pkey" PRIMARY KEY ("id")
8
+ );
9
+
10
+ -- CreateTable
11
+ CREATE TABLE "Feature" (
12
+ "id" TEXT NOT NULL,
13
+ "type" TEXT NOT NULL,
14
+ "functionality" TEXT NOT NULL,
15
+ "name" TEXT NOT NULL,
16
+ "description" TEXT,
17
+ "classification" TEXT NOT NULL,
18
+ "kpi" BOOLEAN NOT NULL,
19
+
20
+ CONSTRAINT "Feature_pkey" PRIMARY KEY ("id")
21
+ );
22
+
23
+ -- CreateTable
24
+ CREATE TABLE "_FeatureToTemplate" (
25
+ "A" TEXT NOT NULL,
26
+ "B" TEXT NOT NULL
27
+ );
28
+
29
+ -- CreateTable
30
+ CREATE TABLE "_ProjectToTemplate" (
31
+ "A" TEXT NOT NULL,
32
+ "B" TEXT NOT NULL
33
+ );
34
+
35
+ -- CreateIndex
36
+ CREATE UNIQUE INDEX "Template_id_key" ON "Template"("id");
37
+
38
+ -- CreateIndex
39
+ CREATE UNIQUE INDEX "Template_name_key" ON "Template"("name");
40
+
41
+ -- CreateIndex
42
+ CREATE UNIQUE INDEX "Feature_id_key" ON "Feature"("id");
43
+
44
+ -- CreateIndex
45
+ CREATE UNIQUE INDEX "_FeatureToTemplate_AB_unique" ON "_FeatureToTemplate"("A", "B");
46
+
47
+ -- CreateIndex
48
+ CREATE INDEX "_FeatureToTemplate_B_index" ON "_FeatureToTemplate"("B");
49
+
50
+ -- CreateIndex
51
+ CREATE UNIQUE INDEX "_ProjectToTemplate_AB_unique" ON "_ProjectToTemplate"("A", "B");
52
+
53
+ -- CreateIndex
54
+ CREATE INDEX "_ProjectToTemplate_B_index" ON "_ProjectToTemplate"("B");
55
+
56
+ -- AddForeignKey
57
+ ALTER TABLE "_FeatureToTemplate" ADD CONSTRAINT "_FeatureToTemplate_A_fkey" FOREIGN KEY ("A") REFERENCES "Feature"("id") ON DELETE CASCADE ON UPDATE CASCADE;
58
+
59
+ -- AddForeignKey
60
+ ALTER TABLE "_FeatureToTemplate" ADD CONSTRAINT "_FeatureToTemplate_B_fkey" FOREIGN KEY ("B") REFERENCES "Template"("id") ON DELETE CASCADE ON UPDATE CASCADE;
61
+
62
+ -- AddForeignKey
63
+ ALTER TABLE "_ProjectToTemplate" ADD CONSTRAINT "_ProjectToTemplate_A_fkey" FOREIGN KEY ("A") REFERENCES "Project"("id") ON DELETE CASCADE ON UPDATE CASCADE;
64
+
65
+ -- AddForeignKey
66
+ ALTER TABLE "_ProjectToTemplate" ADD CONSTRAINT "_ProjectToTemplate_B_fkey" FOREIGN KEY ("B") REFERENCES "Template"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,38 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `classification` on the `Feature` table. All the data in the column will be lost.
5
+ - You are about to drop the column `description` on the `Feature` table. All the data in the column will be lost.
6
+ - You are about to drop the column `kpi` on the `Feature` table. All the data in the column will be lost.
7
+ - You are about to drop the column `type` on the `Feature` table. All the data in the column will be lost.
8
+ - You are about to drop the `_FeatureToTemplate` table. If the table is not empty, all the data it contains will be lost.
9
+
10
+ */
11
+ -- DropForeignKey
12
+ ALTER TABLE "_FeatureToTemplate" DROP CONSTRAINT "_FeatureToTemplate_A_fkey";
13
+
14
+ -- DropForeignKey
15
+ ALTER TABLE "_FeatureToTemplate" DROP CONSTRAINT "_FeatureToTemplate_B_fkey";
16
+
17
+ -- AlterTable
18
+ ALTER TABLE "Feature" DROP COLUMN "classification",
19
+ DROP COLUMN "description",
20
+ DROP COLUMN "kpi",
21
+ DROP COLUMN "type";
22
+
23
+ -- DropTable
24
+ DROP TABLE "_FeatureToTemplate";
25
+
26
+ -- CreateTable
27
+ CREATE TABLE "TemplateFeature" (
28
+ "templateId" TEXT NOT NULL,
29
+ "featureId" TEXT NOT NULL,
30
+
31
+ CONSTRAINT "TemplateFeature_pkey" PRIMARY KEY ("templateId","featureId")
32
+ );
33
+
34
+ -- AddForeignKey
35
+ ALTER TABLE "TemplateFeature" ADD CONSTRAINT "TemplateFeature_templateId_fkey" FOREIGN KEY ("templateId") REFERENCES "Template"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
36
+
37
+ -- AddForeignKey
38
+ ALTER TABLE "TemplateFeature" ADD CONSTRAINT "TemplateFeature_featureId_fkey" FOREIGN KEY ("featureId") REFERENCES "Feature"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,30 @@
1
+ -- CreateTable
2
+ CREATE TABLE "FeatureType" (
3
+ "id" TEXT NOT NULL,
4
+ "description" TEXT NOT NULL,
5
+ "Classification" TEXT NOT NULL,
6
+ "KPI" TEXT NOT NULL,
7
+
8
+ CONSTRAINT "FeatureType_pkey" PRIMARY KEY ("id")
9
+ );
10
+
11
+ -- CreateTable
12
+ CREATE TABLE "_FeatureToFeatureType" (
13
+ "A" TEXT NOT NULL,
14
+ "B" TEXT NOT NULL
15
+ );
16
+
17
+ -- CreateIndex
18
+ CREATE UNIQUE INDEX "FeatureType_id_key" ON "FeatureType"("id");
19
+
20
+ -- CreateIndex
21
+ CREATE UNIQUE INDEX "_FeatureToFeatureType_AB_unique" ON "_FeatureToFeatureType"("A", "B");
22
+
23
+ -- CreateIndex
24
+ CREATE INDEX "_FeatureToFeatureType_B_index" ON "_FeatureToFeatureType"("B");
25
+
26
+ -- AddForeignKey
27
+ ALTER TABLE "_FeatureToFeatureType" ADD CONSTRAINT "_FeatureToFeatureType_A_fkey" FOREIGN KEY ("A") REFERENCES "Feature"("id") ON DELETE CASCADE ON UPDATE CASCADE;
28
+
29
+ -- AddForeignKey
30
+ ALTER TABLE "_FeatureToFeatureType" ADD CONSTRAINT "_FeatureToFeatureType_B_fkey" FOREIGN KEY ("B") REFERENCES "FeatureType"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `featureId` to the `FeatureType` table without a default value. This is not possible if the table is not empty.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "FeatureType" ADD COLUMN "featureId" TEXT NOT NULL;
@@ -0,0 +1,47 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - The primary key for the `TemplateFeature` table will be changed. If it partially fails, the table could be left without primary key constraint.
5
+ - You are about to drop the column `featureId` on the `TemplateFeature` table. All the data in the column will be lost.
6
+ - You are about to drop the column `templateId` on the `TemplateFeature` table. All the data in the column will be lost.
7
+ - You are about to drop the `_FeatureToFeatureType` table. If the table is not empty, all the data it contains will be lost.
8
+ - A unique constraint covering the columns `[id]` on the table `TemplateFeature` will be added. If there are existing duplicate values, this will fail.
9
+ - Added the required column `buttonName` to the `TemplateFeature` table without a default value. This is not possible if the table is not empty.
10
+ - Added the required column `featureClassification` to the `TemplateFeature` table without a default value. This is not possible if the table is not empty.
11
+ - Added the required column `featureDescription` to the `TemplateFeature` table without a default value. This is not possible if the table is not empty.
12
+ - Added the required column `featureKpi` to the `TemplateFeature` table without a default value. This is not possible if the table is not empty.
13
+ - Added the required column `featureType` to the `TemplateFeature` table without a default value. This is not possible if the table is not empty.
14
+ - The required column `id` was added to the `TemplateFeature` table with a prisma-level default value. This is not possible if the table is not empty. Please add this column as optional, then populate it before making it required.
15
+ - Added the required column `templateName` to the `TemplateFeature` table without a default value. This is not possible if the table is not empty.
16
+
17
+ */
18
+ -- DropForeignKey
19
+ ALTER TABLE "TemplateFeature" DROP CONSTRAINT "TemplateFeature_featureId_fkey";
20
+
21
+ -- DropForeignKey
22
+ ALTER TABLE "TemplateFeature" DROP CONSTRAINT "TemplateFeature_templateId_fkey";
23
+
24
+ -- DropForeignKey
25
+ ALTER TABLE "_FeatureToFeatureType" DROP CONSTRAINT "_FeatureToFeatureType_A_fkey";
26
+
27
+ -- DropForeignKey
28
+ ALTER TABLE "_FeatureToFeatureType" DROP CONSTRAINT "_FeatureToFeatureType_B_fkey";
29
+
30
+ -- AlterTable
31
+ ALTER TABLE "TemplateFeature" DROP CONSTRAINT "TemplateFeature_pkey",
32
+ DROP COLUMN "featureId",
33
+ DROP COLUMN "templateId",
34
+ ADD COLUMN "buttonName" TEXT NOT NULL,
35
+ ADD COLUMN "featureClassification" TEXT NOT NULL,
36
+ ADD COLUMN "featureDescription" TEXT NOT NULL,
37
+ ADD COLUMN "featureKpi" TEXT NOT NULL,
38
+ ADD COLUMN "featureType" TEXT NOT NULL,
39
+ ADD COLUMN "id" TEXT NOT NULL,
40
+ ADD COLUMN "templateName" TEXT NOT NULL,
41
+ ADD CONSTRAINT "TemplateFeature_pkey" PRIMARY KEY ("id");
42
+
43
+ -- DropTable
44
+ DROP TABLE "_FeatureToFeatureType";
45
+
46
+ -- CreateIndex
47
+ CREATE UNIQUE INDEX "TemplateFeature_id_key" ON "TemplateFeature"("id");
@@ -0,0 +1,82 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `FeatureType` table. If the table is not empty, all the data it contains will be lost.
5
+ - You are about to drop the `_ProjectToTemplate` table. If the table is not empty, all the data it contains will be lost.
6
+ - Added the required column `Classification` to the `Feature` table without a default value. This is not possible if the table is not empty.
7
+ - Added the required column `KPI` to the `Feature` table without a default value. This is not possible if the table is not empty.
8
+ - Added the required column `description` to the `Feature` table without a default value. This is not possible if the table is not empty.
9
+ - Added the required column `templateId` to the `Feature` table without a default value. This is not possible if the table is not empty.
10
+ - Added the required column `mainProjectId` to the `Project` table without a default value. This is not possible if the table is not empty.
11
+ - Added the required column `projectWorkflowId` to the `Template` table without a default value. This is not possible if the table is not empty.
12
+
13
+ */
14
+
15
+ -- DropForeignKey
16
+ ALTER TABLE "_ProjectToTemplate" DROP CONSTRAINT "_ProjectToTemplate_A_fkey";
17
+
18
+ -- DropForeignKey
19
+ ALTER TABLE "_ProjectToTemplate" DROP CONSTRAINT "_ProjectToTemplate_B_fkey";
20
+
21
+ -- AlterTable
22
+ ALTER TABLE "Feature" ADD COLUMN "Classification" TEXT,
23
+ ADD COLUMN "KPI" TEXT,
24
+ ADD COLUMN "description" TEXT,
25
+ ADD COLUMN "templateId" TEXT;
26
+
27
+
28
+ -- AlterTable
29
+ ALTER TABLE "Project" ADD COLUMN "mainProjectId" TEXT NOT NULL;
30
+
31
+ -- AlterTable
32
+ ALTER TABLE "Template" ADD COLUMN "projectWorkflowId" TEXT NOT NULL;
33
+
34
+ -- DropTable
35
+ DROP TABLE "FeatureType";
36
+
37
+ -- DropTable
38
+ DROP TABLE "_ProjectToTemplate";
39
+
40
+ -- CreateTable
41
+ CREATE TABLE "ProjectWorkFlow" (
42
+ "id" TEXT NOT NULL,
43
+ "projectId" TEXT NOT NULL,
44
+ "templateName" TEXT NOT NULL,
45
+ "buttonName" TEXT NOT NULL,
46
+
47
+ CONSTRAINT "ProjectWorkFlow_pkey" PRIMARY KEY ("id")
48
+ );
49
+
50
+ -- CreateTable
51
+ CREATE TABLE "MainProject" (
52
+ "id" TEXT NOT NULL,
53
+ "country" TEXT NOT NULL,
54
+ "client" TEXT NOT NULL,
55
+ "mainProjectName" TEXT NOT NULL,
56
+
57
+ CONSTRAINT "MainProject_pkey" PRIMARY KEY ("id")
58
+ );
59
+
60
+ -- CreateIndex
61
+ CREATE UNIQUE INDEX "ProjectWorkFlow_id_key" ON "ProjectWorkFlow"("id");
62
+
63
+ -- CreateIndex
64
+ CREATE UNIQUE INDEX "ProjectWorkFlow_projectId_key" ON "ProjectWorkFlow"("projectId");
65
+
66
+ -- CreateIndex
67
+ CREATE UNIQUE INDEX "MainProject_id_key" ON "MainProject"("id");
68
+
69
+ -- AddForeignKey
70
+ ALTER TABLE "Template" ADD CONSTRAINT "Template_projectWorkflowId_fkey" FOREIGN KEY ("projectWorkflowId") REFERENCES "ProjectWorkFlow"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
71
+
72
+ -- AddForeignKey
73
+ ALTER TABLE "Feature" ADD CONSTRAINT "Feature_templateId_fkey" FOREIGN KEY ("templateId") REFERENCES "Template"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
74
+
75
+ -- AddForeignKey
76
+ ALTER TABLE "ProjectWorkFlow" ADD CONSTRAINT "ProjectWorkFlow_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
77
+
78
+ -- AddForeignKey
79
+ ALTER TABLE "Project" ADD CONSTRAINT "Project_mainProjectId_fkey" FOREIGN KEY ("mainProjectId") REFERENCES "MainProject"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
80
+
81
+ -- CreateEnum
82
+ CREATE TYPE "FeatureType" AS ENUM ('ALPHANUMERICAL_TEXTBOX', 'NUMERICAL_TEXTBOX', 'IMAGE_UPLOAD', 'DROPDOWN');
@@ -0,0 +1,83 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `templateId` on the `Feature` table. All the data in the column will be lost.
5
+ - You are about to drop the column `userId` on the `Project` table. All the data in the column will be lost.
6
+ - You are about to drop the column `projectWorkflowId` on the `Template` table. All the data in the column will be lost.
7
+ - A unique constraint covering the columns `[email]` on the table `User` will be added. If there are existing duplicate values, this will fail.
8
+ - Made the column `Classification` on table `Feature` required. This step will fail if there are existing NULL values in that column.
9
+ - Made the column `KPI` on table `Feature` required. This step will fail if there are existing NULL values in that column.
10
+ - Made the column `description` on table `Feature` required. This step will fail if there are existing NULL values in that column.
11
+
12
+ */
13
+ -- DropForeignKey
14
+ ALTER TABLE "Feature" DROP CONSTRAINT "Feature_templateId_fkey";
15
+
16
+ -- DropForeignKey
17
+ ALTER TABLE "Project" DROP CONSTRAINT "Project_mainProjectId_fkey";
18
+
19
+ -- DropForeignKey
20
+ ALTER TABLE "Project" DROP CONSTRAINT "Project_userId_fkey";
21
+
22
+ -- DropForeignKey
23
+ ALTER TABLE "Template" DROP CONSTRAINT "Template_projectWorkflowId_fkey";
24
+
25
+ -- AlterTable
26
+ ALTER TABLE "Feature" DROP COLUMN "templateId",
27
+ ALTER COLUMN "Classification" SET NOT NULL,
28
+ ALTER COLUMN "KPI" SET NOT NULL,
29
+ ALTER COLUMN "description" SET NOT NULL;
30
+
31
+ -- AlterTable
32
+ ALTER TABLE "Project" DROP COLUMN "userId",
33
+ ADD COLUMN "userEmail" TEXT,
34
+ ALTER COLUMN "mainProjectId" DROP NOT NULL;
35
+
36
+ -- AlterTable
37
+ ALTER TABLE "Template" DROP COLUMN "projectWorkflowId";
38
+
39
+ -- CreateTable
40
+ CREATE TABLE "TemplateComponent" (
41
+ "id" TEXT NOT NULL,
42
+ "dateInput" TEXT,
43
+ "timeInput" TEXT,
44
+ "inputField" TEXT,
45
+ "button" TEXT,
46
+ "uploadImage" TEXT,
47
+ "templateFeatureId" TEXT,
48
+
49
+ CONSTRAINT "TemplateComponent_pkey" PRIMARY KEY ("id")
50
+ );
51
+
52
+ -- CreateTable
53
+ CREATE TABLE "_FeatureToTemplate" (
54
+ "A" TEXT NOT NULL,
55
+ "B" TEXT NOT NULL
56
+ );
57
+
58
+ -- CreateIndex
59
+ CREATE UNIQUE INDEX "TemplateComponent_id_key" ON "TemplateComponent"("id");
60
+
61
+ -- CreateIndex
62
+ CREATE UNIQUE INDEX "_FeatureToTemplate_AB_unique" ON "_FeatureToTemplate"("A", "B");
63
+
64
+ -- CreateIndex
65
+ CREATE INDEX "_FeatureToTemplate_B_index" ON "_FeatureToTemplate"("B");
66
+
67
+ -- CreateIndex
68
+ CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
69
+
70
+ -- AddForeignKey
71
+ ALTER TABLE "TemplateComponent" ADD CONSTRAINT "TemplateComponent_templateFeatureId_fkey" FOREIGN KEY ("templateFeatureId") REFERENCES "TemplateFeature"("id") ON DELETE SET NULL ON UPDATE CASCADE;
72
+
73
+ -- AddForeignKey
74
+ ALTER TABLE "Project" ADD CONSTRAINT "Project_mainProjectId_fkey" FOREIGN KEY ("mainProjectId") REFERENCES "MainProject"("id") ON DELETE SET NULL ON UPDATE CASCADE;
75
+
76
+ -- AddForeignKey
77
+ ALTER TABLE "Project" ADD CONSTRAINT "Project_userEmail_fkey" FOREIGN KEY ("userEmail") REFERENCES "User"("email") ON DELETE SET NULL ON UPDATE CASCADE;
78
+
79
+ -- AddForeignKey
80
+ ALTER TABLE "_FeatureToTemplate" ADD CONSTRAINT "_FeatureToTemplate_A_fkey" FOREIGN KEY ("A") REFERENCES "Feature"("id") ON DELETE CASCADE ON UPDATE CASCADE;
81
+
82
+ -- AddForeignKey
83
+ ALTER TABLE "_FeatureToTemplate" ADD CONSTRAINT "_FeatureToTemplate_B_fkey" FOREIGN KEY ("B") REFERENCES "Template"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,3 @@
1
+ -- AlterTable
2
+ ALTER TABLE "TemplateComponent" ADD COLUMN "dropdown" JSON,
3
+ ADD COLUMN "numberInput" TEXT;
@@ -0,0 +1,17 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `button` on the `TemplateComponent` table. All the data in the column will be lost.
5
+ - Made the column `templateFeatureId` on table `TemplateComponent` required. This step will fail if there are existing NULL values in that column.
6
+
7
+ */
8
+ -- DropForeignKey
9
+ ALTER TABLE "TemplateComponent" DROP CONSTRAINT "TemplateComponent_templateFeatureId_fkey";
10
+
11
+ -- AlterTable
12
+ ALTER TABLE "TemplateComponent" DROP COLUMN "button",
13
+ ADD COLUMN "buttonName" TEXT,
14
+ ALTER COLUMN "templateFeatureId" SET NOT NULL;
15
+
16
+ -- AddForeignKey
17
+ ALTER TABLE "TemplateComponent" ADD CONSTRAINT "TemplateComponent_templateFeatureId_fkey" FOREIGN KEY ("templateFeatureId") REFERENCES "TemplateFeature"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,24 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - The `dateInput` column on the `TemplateComponent` table would be dropped and recreated. This will lead to data loss if there is data in the column.
5
+ - The `timeInput` column on the `TemplateComponent` table would be dropped and recreated. This will lead to data loss if there is data in the column.
6
+ - The `inputField` column on the `TemplateComponent` table would be dropped and recreated. This will lead to data loss if there is data in the column.
7
+ - The `uploadImage` column on the `TemplateComponent` table would be dropped and recreated. This will lead to data loss if there is data in the column.
8
+ - The `numberInput` column on the `TemplateComponent` table would be dropped and recreated. This will lead to data loss if there is data in the column.
9
+ - The `buttonName` column on the `TemplateComponent` table would be dropped and recreated. This will lead to data loss if there is data in the column.
10
+
11
+ */
12
+ -- AlterTable
13
+ ALTER TABLE "TemplateComponent" DROP COLUMN "dateInput",
14
+ ADD COLUMN "dateInput" JSON,
15
+ DROP COLUMN "timeInput",
16
+ ADD COLUMN "timeInput" JSON,
17
+ DROP COLUMN "inputField",
18
+ ADD COLUMN "inputField" JSON,
19
+ DROP COLUMN "uploadImage",
20
+ ADD COLUMN "uploadImage" JSON,
21
+ DROP COLUMN "numberInput",
22
+ ADD COLUMN "numberInput" JSON,
23
+ DROP COLUMN "buttonName",
24
+ ADD COLUMN "buttonName" JSON;
@@ -0,0 +1,10 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `mainProjectName` on the `MainProject` table. All the data in the column will be lost.
5
+ - Added the required column `name` to the `MainProject` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE "MainProject" DROP COLUMN "mainProjectName",
10
+ ADD COLUMN "name" TEXT NOT NULL;
@@ -0,0 +1,13 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `client` on the `MainProject` table. All the data in the column will be lost.
5
+ - Added the required column `CamusatClientId` to the `MainProject` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE "MainProject" DROP COLUMN "client",
10
+ ADD COLUMN "CamusatClientId" TEXT NOT NULL;
11
+
12
+ -- AddForeignKey
13
+ ALTER TABLE "MainProject" ADD CONSTRAINT "MainProject_CamusatClientId_fkey" FOREIGN KEY ("CamusatClientId") REFERENCES "CamusatClient"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,16 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `countryName` on the `CamusatClient` table. All the data in the column will be lost.
5
+ - Added the required column `countryId` to the `CamusatClient` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- DropForeignKey
9
+ ALTER TABLE "CamusatClient" DROP CONSTRAINT "CamusatClient_countryName_fkey";
10
+
11
+ -- AlterTable
12
+ ALTER TABLE "CamusatClient" DROP COLUMN "countryName",
13
+ ADD COLUMN "countryId" TEXT NOT NULL;
14
+
15
+ -- AddForeignKey
16
+ ALTER TABLE "CamusatClient" ADD CONSTRAINT "CamusatClient_countryId_fkey" FOREIGN KEY ("countryId") REFERENCES "CamusatCountry"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,13 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `country` on the `MainProject` table. All the data in the column will be lost.
5
+ - Added the required column `camusatCountryid` to the `MainProject` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE "MainProject" DROP COLUMN "country",
10
+ ADD COLUMN "camusatCountryid" TEXT NOT NULL;
11
+
12
+ -- AddForeignKey
13
+ ALTER TABLE "MainProject" ADD CONSTRAINT "MainProject_camusatCountryid_fkey" FOREIGN KEY ("camusatCountryid") REFERENCES "CamusatCountry"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,16 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `CamusatClientId` on the `MainProject` table. All the data in the column will be lost.
5
+ - Added the required column `camusatClientId` to the `MainProject` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- DropForeignKey
9
+ ALTER TABLE "MainProject" DROP CONSTRAINT "MainProject_CamusatClientId_fkey";
10
+
11
+ -- AlterTable
12
+ ALTER TABLE "MainProject" DROP COLUMN "CamusatClientId",
13
+ ADD COLUMN "camusatClientId" TEXT NOT NULL;
14
+
15
+ -- AddForeignKey
16
+ ALTER TABLE "MainProject" ADD CONSTRAINT "MainProject_camusatClientId_fkey" FOREIGN KEY ("camusatClientId") REFERENCES "CamusatClient"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,8 @@
1
+ -- DropForeignKey
2
+ ALTER TABLE "MainProject" DROP CONSTRAINT "MainProject_camusatClientId_fkey";
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "MainProject" ALTER COLUMN "camusatClientId" DROP NOT NULL;
6
+
7
+ -- AddForeignKey
8
+ ALTER TABLE "MainProject" ADD CONSTRAINT "MainProject_camusatClientId_fkey" FOREIGN KEY ("camusatClientId") REFERENCES "CamusatClient"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,16 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `camusatCountryid` on the `MainProject` table. All the data in the column will be lost.
5
+ - Added the required column `camusatCountryId` to the `MainProject` table without a default value. This is not possible if the table is not empty.
6
+
7
+ */
8
+ -- DropForeignKey
9
+ ALTER TABLE "MainProject" DROP CONSTRAINT "MainProject_camusatCountryid_fkey";
10
+
11
+ -- AlterTable
12
+ ALTER TABLE "MainProject" DROP COLUMN "camusatCountryid",
13
+ ADD COLUMN "camusatCountryId" TEXT NOT NULL;
14
+
15
+ -- AddForeignKey
16
+ ALTER TABLE "MainProject" ADD CONSTRAINT "MainProject_camusatCountryId_fkey" FOREIGN KEY ("camusatCountryId") REFERENCES "CamusatCountry"("id") ON DELETE RESTRICT ON UPDATE CASCADE;