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.
- package/package.json +1 -1
- package/prisma/migrations/0_init/migration.sql +0 -0
- package/prisma/migrations/20240202082320_init/migration.sql +17 -0
- package/prisma/migrations/20240202091027_camusat_client/migration.sql +29 -0
- package/prisma/migrations/20240202124330_camusatcountry/migration.sql +20 -0
- package/prisma/migrations/20240203085209_feature/migration.sql +66 -0
- package/prisma/migrations/20240203123342_feature/migration.sql +38 -0
- package/prisma/migrations/20240203124454_featuretype/migration.sql +30 -0
- package/prisma/migrations/20240203134414_featuretype/migration.sql +8 -0
- package/prisma/migrations/20240203154141_featuretype/migration.sql +47 -0
- package/prisma/migrations/20240203203915_template/migration.sql +82 -0
- package/prisma/migrations/20240204040725_template_component/migration.sql +83 -0
- package/prisma/migrations/20240204043127_template_component/migration.sql +3 -0
- package/prisma/migrations/20240204051036_template_component/migration.sql +17 -0
- package/prisma/migrations/20240204052923_template_component/migration.sql +24 -0
- package/prisma/migrations/20240204103902_template_component/migration.sql +10 -0
- package/prisma/migrations/20240204112656_camusat_client/migration.sql +13 -0
- package/prisma/migrations/20240204113143_camusat_client/migration.sql +16 -0
- package/prisma/migrations/20240204133932_camusat_client/migration.sql +13 -0
- package/prisma/migrations/20240204134637_camusat_client/migration.sql +16 -0
- package/prisma/migrations/20240204135459_camusat_client/migration.sql +8 -0
- package/prisma/migrations/20240204135615_camusat_client/migration.sql +16 -0
- package/prisma/migrations/20240204141001_camusat_client/migration.sql +16 -0
- package/prisma/migrations/20240205070804_template/migration.sql +60 -0
- package/prisma/migrations/20240205071138_template/migration.sql +8 -0
- package/prisma/migrations/20240205074015_template/migration.sql +11 -0
- package/prisma/migrations/20240205100949_template/migration.sql +3 -0
- package/prisma/migrations/20240205170632_template/migration.sql +26 -0
- package/prisma/migrations/20240205171038_template/migration.sql +8 -0
- package/prisma/migrations/20240206115225_template/migration.sql +2 -0
- package/prisma/migrations/20240206115743_template/migration.sql +8 -0
- package/prisma/migrations/20240206122145_template/migration.sql +8 -0
- package/prisma/migrations/20240206122530_template/migration.sql +17 -0
- package/prisma/migrations/20240206124010_template/migration.sql +2 -0
- package/prisma/migrations/20240206124504_template/migration.sql +8 -0
- package/prisma/migrations/20240207123737_template_component/migration.sql +27 -0
- package/prisma/migrations/20240207182427_project_workflow/migration.sql +13 -0
- package/prisma/migrations/20240208080438_project_workflow/migration.sql +29 -0
- package/prisma/migrations/20240208094341_project_workflow/migration.sql +20 -0
- package/prisma/migrations/20240208094513_project_workflow/migration.sql +11 -0
- package/prisma/migrations/20240208110543_feature/migration.sql +42 -0
- package/prisma/migrations/20240209094123_feature/migration.sql +2 -0
- package/prisma/migrations/20240211174122_camusat_client/migration.sql +2 -0
- package/prisma/migrations/20240219060721_feature/migration.sql +14 -0
- package/prisma/migrations/20240301063634_material/migration.sql +40 -0
- package/prisma/migrations/20240301064450_material/migration.sql +8 -0
- package/prisma/migrations/20240301071914_bill_of_material/migration.sql +32 -0
- package/prisma/migrations/20240301130744_dispatch_material/migration.sql +19 -0
- package/prisma/migrations/20240304051150_dispatch_material/migration.sql +5 -0
- package/prisma/migrations/20240304060722_dispatch_material/migration.sql +5 -0
- package/prisma/migrations/20240304060902_dispatch_material/migration.sql +8 -0
- package/prisma/migrations/20240304061156_dispatch_material/migration.sql +9 -0
- package/prisma/migrations/20240304173952_stock_movement/migration.sql +40 -0
- package/prisma/migrations/20240305072137_stock_movement/migration.sql +239 -0
- package/prisma/migrations/20240305072744_stock_movement/migration.sql +12 -0
- package/prisma/migrations/20240306055959_stock_movement/migration.sql +11 -0
- package/prisma/migrations/20240306062724_stock_movement/migration.sql +2 -0
- package/prisma/migrations/20240306113309_stock_movement/migration.sql +8 -0
- package/prisma/migrations/20240306141448_stock_movement/migration.sql +5 -0
- package/prisma/migrations/20240306144254_stock_movement/migration.sql +5 -0
- package/prisma/migrations/20240306154800_stock_movement/migration.sql +8 -0
- package/prisma/migrations/20240307095205_stock_movement/migration.sql +16 -0
- package/prisma/migrations/20240308175028_new/migration.sql +8 -0
- package/prisma/migrations/20240310114206_dispatch_project/migration.sql +5 -0
- package/prisma/migrations/20240311121226_new/migration.sql +71 -0
- package/prisma/migrations/20240311171024_new/migration.sql +8 -0
- package/prisma/migrations/20240312090511_material/migration.sql +17 -0
- package/prisma/migrations/20240312095600_material/migration.sql +16 -0
- package/prisma/migrations/20240312115431_material/migration.sql +11 -0
- package/prisma/migrations/20240316161358_work_order/migration.sql +3 -0
- package/prisma/migrations/20240318112352_problem_categorization/migration.sql +14 -0
- package/prisma/migrations/20240318112616_problem_categorization/migration.sql +8 -0
- package/prisma/migrations/20240319072457_work_order/migration.sql +5 -0
- package/prisma/migrations/20240320124008_dispatch_project/migration.sql +26 -0
- package/prisma/migrations/20240321081929_dispatch_project/migration.sql +8 -0
- package/prisma/migrations/20240321102139_work_order/migration.sql +45 -0
- package/prisma/migrations/20240321103420_work_order/migration.sql +14 -0
- package/prisma/migrations/20240321103537_work_order/migration.sql +2 -0
- package/prisma/migrations/20240322061027_material/migration.sql +11 -0
- package/prisma/migrations/20240323122952_work_order/migration.sql +6 -0
- package/prisma/migrations/20240323125822_work_order/migration.sql +2 -0
- package/prisma/migrations/20240325082900_work_order/migration.sql +11 -0
- package/prisma/migrations/20240326115608_work_order/migration.sql +18 -0
- package/prisma/migrations/20240327051438_work_order/migration.sql +8 -0
- package/prisma/migrations/20240327100905_work_order/migration.sql +24 -0
- package/prisma/migrations/20240328121421_work_order/migration.sql +26 -0
- package/prisma/migrations/20240328122320_work_order/migration.sql +9 -0
- package/prisma/migrations/20240328123833_work_order/migration.sql +3 -0
- package/prisma/migrations/20240328132921_work_order/migration.sql +5 -0
- package/prisma/migrations/20240328142205_work_order/migration.sql +2 -0
- package/prisma/migrations/20240401184203_billof_material/migration.sql +8 -0
- package/prisma/migrations/20240402125649_feature/migration.sql +2 -0
- package/prisma/migrations/20240404054220_project/migration.sql +29 -0
- package/prisma/migrations/20240407224722_user/migration.sql +2 -0
- package/prisma/migrations/20240408100730_template_component/migration.sql +12 -0
- package/prisma/migrations/20240409094754_template/migration.sql +2 -0
- package/prisma/migrations/20240409095653_template/migration.sql +2 -0
- package/prisma/migrations/20240409100032_features/migration.sql +2 -0
- package/prisma/migrations/20240409100313_project/migration.sql +5 -0
- package/prisma/migrations/20240411073053_subject_email_configurations/migration.sql +2 -0
- package/prisma/migrations/20240412093517_work_order_tasks/migration.sql +3 -0
- package/prisma/migrations/20240413085449_problem_categorization/migration.sql +5 -0
- package/prisma/migrations/20240415101559_project/migration.sql +20 -0
- package/prisma/migrations/20240417062104_sync_to_git/migration.sql +122 -0
- package/prisma/migrations/20240417125606_workorder/migration.sql +2 -0
- package/prisma/migrations/20240422112728_movement_logs/migration.sql +17 -0
- package/prisma/migrations/20240423100846_work_order_task/migration.sql +3 -0
- package/prisma/migrations/20240428163748_email_count/migration.sql +6 -0
- package/prisma/migrations/20240430112607_work_order_edit_logs/migration.sql +25 -0
- package/prisma/migrations/20240502051952_template_status_color/migration.sql +2 -0
- package/prisma/migrations/20240506195539_projecttypes/migration.sql +29 -0
- package/prisma/migrations/20240508074229_workorder_task/migration.sql +2 -0
- package/prisma/migrations/20240515065236_coms/migration.sql +21 -0
- package/prisma/migrations/20240516093046_subsidiary_prefix/migration.sql +2 -0
- package/prisma/migrations/20240516170701_/migration.sql +9 -0
- package/prisma/migrations/20240520093356_emailconfig/migration.sql +13 -0
- package/prisma/migrations/20240530093136_emailtemplates/migration.sql +24 -0
- package/prisma/migrations/20240530110729_emailtemplates/migration.sql +4 -0
- package/prisma/migrations/20240530113416_emailtemplates/migration.sql +9 -0
- package/prisma/migrations/20240605072947_audit/migration.sql +2 -0
- package/prisma/migrations/20240605130105_notification_tokens/migration.sql +2 -0
- package/prisma/migrations/20240606074325_notifications/migration.sql +21 -0
- package/prisma/migrations/20240606074819_notif2/migration.sql +8 -0
- package/prisma/migrations/20240606172109_excel_config/migration.sql +2 -0
- package/prisma/migrations/20240607094457_reportformats/migration.sql +27 -0
- package/prisma/migrations/20240611101040_audit_matrices/migration.sql +2 -0
- package/prisma/migrations/20240611102951_workorder_audit_matrix/migration.sql +2 -0
- package/prisma/migrations/20240613063600_dispatch_roles/migration.sql +18 -0
- package/prisma/migrations/20240613071005_permissions_view_schedule/migration.sql +2 -0
- package/prisma/migrations/20240703093757_email_templates_templateinfo/migration.sql +2 -0
- package/prisma/migrations/20240715124159_mainproject_roles/migration.sql +5 -0
- package/prisma/migrations/20240722073020_admin_permissions_update/migration.sql +4 -0
- package/prisma/migrations/20240722082135_edit_projects/migration.sql +2 -0
- package/prisma/migrations/20240726090437_user_refresh_token/migration.sql +11 -0
- package/prisma/migrations/20240729135109_project_workflow_edit/migration.sql +2 -0
- package/prisma/migrations/20240729140705_template_component_project_index/migration.sql +2 -0
- package/prisma/migrations/20240731061332_report_format_bom_info/migration.sql +2 -0
- package/prisma/migrations/20240805073630_user_platform_relationship/migration.sql +17 -0
- package/prisma/migrations/20240809075746_workorder_sla/migration.sql +2 -0
- package/prisma/migrations/20240814094717_platform_to_project/migration.sql +17 -0
- package/prisma/migrations/20240814102025_platforms_to_project/migration.sql +8 -0
- package/prisma/migrations/20240819093908_network_elements/migration.sql +239 -0
- package/prisma/migrations/20240820092024_network_element_attributes/migration.sql +276 -0
- package/prisma/migrations/20240826083231_fat_template/migration.sql +45 -0
- package/prisma/migrations/20240826085204_pbo_pbo_template_to_project/migration.sql +23 -0
- package/prisma/migrations/20240826091924_attributes_to_fat_optional/migration.sql +15 -0
- package/prisma/migrations/20240902094457_email_signature/migration.sql +2 -0
- package/prisma/migrations/20240904092123_pbo_fat_zone_geometry/migration.sql +16 -0
- package/prisma/migrations/20240905125754_fat_name_attributes/migration.sql +3 -0
- package/prisma/migrations/20240905131742_fat_attribute_visible_on_mobile/migration.sql +2 -0
- package/prisma/migrations/20240911083041_country_list_user/migration.sql +17 -0
- package/prisma/migrations/20240911135957_actiondate_workorder_activity_log/migration.sql +2 -0
- package/prisma/migrations/20240911140227_workorder_activity_log_action_date_string_to_datetime/migration.sql +9 -0
- package/prisma/migrations/20240916130344_cable_template/migration.sql +72 -0
- package/prisma/migrations/20240916132002_cable_terminal_access/migration.sql +5 -0
- package/prisma/migrations/20240917113037_cable_id_on_cable_attributes_optional/migration.sql +8 -0
- package/prisma/migrations/20240917114004_visible_on_mobile_cable_attributes/migration.sql +2 -0
- package/prisma/migrations/20240917114107_visible_on_mobile_cable_attributes/migration.sql +9 -0
- package/prisma/migrations/20240919080014_create_cluster_and_central_office_tables/migration.sql +54 -0
- package/prisma/migrations/20240920092832_create_qr_code/migration.sql +39 -0
- package/prisma/migrations/20240924121308_qrcode_tag/migration.sql +23 -0
- package/prisma/migrations/20241003093709_integration_login_permissions/migration.sql +3 -0
- package/prisma/migrations/20241024090904_project_phase/migration.sql +2 -0
- package/prisma/migrations/20241024115650_project_phase_log/migration.sql +24 -0
- package/prisma/migrations/20241026095632_pbo_fat_attributes/migration.sql +2 -0
- package/prisma/migrations/20241028095307_qr_code_template_i_ds/migration.sql +9 -0
- package/prisma/migrations/20241029081315_add_more_network_elements/migration.sql +273 -0
- package/prisma/migrations/20241029084826_cable_coordinates/migration.sql +5 -0
- package/prisma/migrations/20241029092244_splice_closure_to_project/migration.sql +5 -0
- package/prisma/migrations/20241029092705_splice_closure_to_cluster/migration.sql +5 -0
- package/prisma/migrations/20241029094049_network_element_templates/migration.sql +295 -0
- package/prisma/migrations/20241029102645_network_elements_name/migration.sql +50 -0
- package/prisma/migrations/20241102074544_mail_carboncopy_list/migration.sql +2 -0
- package/prisma/migrations/20241104114549_change_qr_code_to_qr_code_template/migration.sql +122 -0
- package/prisma/migrations/20241104121110_qr_code_template_to_network_element_template/migration.sql +33 -0
- package/prisma/migrations/20241106101316_zone_coordinates/migration.sql +5 -0
- package/prisma/migrations/20241201141127_auto_name_elements/migration.sql +39 -0
- package/prisma/migrations/20241201144124_auto_name_element/migration.sql +39 -0
- package/prisma/migrations/20241201150401_template_index/migration.sql +29 -0
- package/prisma/migrations/20241205084445_template_id/migration.sql +59 -0
- package/prisma/migrations/20241205093552_integration_project_user_status/migration.sql +23 -0
- package/prisma/migrations/20241211093653_installation_sequence/migration.sql +90 -0
- package/prisma/migrations/20241211150807_installation_index/migration.sql +2 -0
- package/prisma/migrations/20241217082800_cluster_boundary/migration.sql +3 -0
- package/prisma/migrations/20250114092907_workorder_to_pbo_fat/migration.sql +5 -0
- package/prisma/migrations/20250114112746_workorder_to_sfu_and_building/migration.sql +9 -0
- package/prisma/migrations/20250211070850_networkelement_sequence/migration.sql +19 -0
- package/prisma/migrations/20250211072332_refresh_db/migration.sql +95 -0
- package/prisma/migrations/20250211080946_installation_sequence_self_relation/migration.sql +6 -0
- package/prisma/migrations/20250220100853_cluster_to_user_status/migration.sql +32 -0
- package/prisma/migrations/20250228100106_qr_code_template_to_cluster/migration.sql +5 -0
- package/prisma/migrations/20250304155122_clusters_to_users_centraloffices_to_users/migration.sql +50 -0
- package/prisma/migrations/20250306100801_templates_to_projects/migration.sql +244 -0
- package/prisma/migrations/20250306101814_cluster_naming_convention/migration.sql +2 -0
- package/prisma/migrations/migration_lock.toml +1 -1
- package/prisma/migrations_old/20231209164007_/migration.sql +8 -0
- package/prisma/migrations_old/20231209192452_country_table/migration.sql +7 -0
- package/prisma/migrations_old/20231209194848_/migration.sql +10 -0
- package/prisma/migrations_old/20231209195140_/migration.sql +8 -0
- package/prisma/migrations_old/20231209201218_country_update/migration.sql +29 -0
- package/prisma/migrations_old/20231209201405_/migration.sql +8 -0
- package/prisma/migrations_old/20231209213149_camusat_country/migration.sql +20 -0
- package/prisma/migrations_old/20231209221814_platform/migration.sql +26 -0
- package/prisma/migrations_old/20231209223246_/migration.sql +16 -0
- package/prisma/migrations_old/20231209231721_roles/migration.sql +34 -0
- package/prisma/migrations_old/20231210113501_team_and_users/migration.sql +119 -0
- package/prisma/migrations_old/20231210181832_user_update/migration.sql +25 -0
- package/prisma/migrations_old/20231219121311_add_projects/migration.sql +60 -0
- package/prisma/migrations_old/20231219123045_/migration.sql +8 -0
- package/prisma/migrations_old/20231219123850_audit/migration.sql +20 -0
- package/prisma/migrations_old/20240116090035_/migration.sql +57 -0
- package/prisma/migrations_old/20240220085809_emails/migration.sql +82 -0
- package/prisma/migrations_old/20240226075734_update_email_config_and_workorder/migration.sql +33 -0
- package/prisma/migrations_old/20240227112839_update_email_config/migration.sql +2 -0
- package/prisma/migrations_old/20240227124801_work_order_update/migration.sql +6 -0
- package/prisma/migrations_old/migration_lock.toml +3 -0
- package/prisma/schema.prisma +26 -2
- /package/prisma/{migrations → migrations_old}/20250121073034_homogenize_migrations/migration.sql +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Added the required column `pboFatTemplateId` to the `PboFatAttributes` table without a default value. This is not possible if the table is not empty.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "Cable" ALTER COLUMN "length" DROP NOT NULL;
|
|
9
|
+
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "PboFat" ADD COLUMN "photos" JSONB,
|
|
12
|
+
ADD COLUMN "terminalAccess" BOOLEAN NOT NULL DEFAULT false,
|
|
13
|
+
ADD COLUMN "zone" TEXT;
|
|
14
|
+
|
|
15
|
+
-- AlterTable
|
|
16
|
+
ALTER TABLE "PboFatAttributes" ADD COLUMN "pboFatTemplateId" TEXT NOT NULL;
|
|
17
|
+
|
|
18
|
+
-- CreateTable
|
|
19
|
+
CREATE TABLE "PboFatTemplate" (
|
|
20
|
+
"id" TEXT NOT NULL,
|
|
21
|
+
"no" SERIAL NOT NULL,
|
|
22
|
+
"status" TEXT NOT NULL DEFAULT 'active',
|
|
23
|
+
"terminalAccess" BOOLEAN NOT NULL DEFAULT false,
|
|
24
|
+
"photos" JSONB,
|
|
25
|
+
"zone" TEXT,
|
|
26
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
27
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
28
|
+
"deletedAt" TIMESTAMP(3),
|
|
29
|
+
"updatedById" TEXT,
|
|
30
|
+
"networkElementId" TEXT NOT NULL,
|
|
31
|
+
|
|
32
|
+
CONSTRAINT "PboFatTemplate_pkey" PRIMARY KEY ("id")
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
-- CreateIndex
|
|
36
|
+
CREATE UNIQUE INDEX "PboFatTemplate_id_key" ON "PboFatTemplate"("id");
|
|
37
|
+
|
|
38
|
+
-- AddForeignKey
|
|
39
|
+
ALTER TABLE "PboFatTemplate" ADD CONSTRAINT "PboFatTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
40
|
+
|
|
41
|
+
-- AddForeignKey
|
|
42
|
+
ALTER TABLE "PboFatTemplate" ADD CONSTRAINT "PboFatTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
43
|
+
|
|
44
|
+
-- AddForeignKey
|
|
45
|
+
ALTER TABLE "PboFatAttributes" ADD CONSTRAINT "PboFatAttributes_pboFatTemplateId_fkey" FOREIGN KEY ("pboFatTemplateId") REFERENCES "PboFatTemplate"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `projectId` on the `PboFatAttributes` table. All the data in the column will be lost.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- DropForeignKey
|
|
8
|
+
ALTER TABLE "PboFatAttributes" DROP CONSTRAINT "PboFatAttributes_projectId_fkey";
|
|
9
|
+
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "PboFat" ADD COLUMN "projectId" TEXT;
|
|
12
|
+
|
|
13
|
+
-- AlterTable
|
|
14
|
+
ALTER TABLE "PboFatAttributes" DROP COLUMN "projectId";
|
|
15
|
+
|
|
16
|
+
-- AlterTable
|
|
17
|
+
ALTER TABLE "PboFatTemplate" ADD COLUMN "projectId" TEXT;
|
|
18
|
+
|
|
19
|
+
-- AddForeignKey
|
|
20
|
+
ALTER TABLE "PboFatTemplate" ADD CONSTRAINT "PboFatTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
21
|
+
|
|
22
|
+
-- AddForeignKey
|
|
23
|
+
ALTER TABLE "PboFat" ADD CONSTRAINT "PboFat_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
-- DropForeignKey
|
|
2
|
+
ALTER TABLE "PboFatAttributes" DROP CONSTRAINT "PboFatAttributes_pboFatId_fkey";
|
|
3
|
+
|
|
4
|
+
-- DropForeignKey
|
|
5
|
+
ALTER TABLE "PboFatAttributes" DROP CONSTRAINT "PboFatAttributes_pboFatTemplateId_fkey";
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "PboFatAttributes" ALTER COLUMN "pboFatId" DROP NOT NULL,
|
|
9
|
+
ALTER COLUMN "pboFatTemplateId" DROP NOT NULL;
|
|
10
|
+
|
|
11
|
+
-- AddForeignKey
|
|
12
|
+
ALTER TABLE "PboFatAttributes" ADD CONSTRAINT "PboFatAttributes_pboFatTemplateId_fkey" FOREIGN KEY ("pboFatTemplateId") REFERENCES "PboFatTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
13
|
+
|
|
14
|
+
-- AddForeignKey
|
|
15
|
+
ALTER TABLE "PboFatAttributes" ADD CONSTRAINT "PboFatAttributes_pboFatId_fkey" FOREIGN KEY ("pboFatId") REFERENCES "PboFat"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- The `zone` column on the `PboFat` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
+
- The `zone` column on the `PboFatTemplate` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
-- AlterTable
|
|
9
|
+
ALTER TABLE "PboFat" ADD COLUMN "geometry" JSONB,
|
|
10
|
+
DROP COLUMN "zone",
|
|
11
|
+
ADD COLUMN "zone" JSONB;
|
|
12
|
+
|
|
13
|
+
-- AlterTable
|
|
14
|
+
ALTER TABLE "PboFatTemplate" ADD COLUMN "geometry" JSONB,
|
|
15
|
+
DROP COLUMN "zone",
|
|
16
|
+
ADD COLUMN "zone" JSONB;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "_CamusatCountryToUser" (
|
|
3
|
+
"A" TEXT NOT NULL,
|
|
4
|
+
"B" TEXT NOT NULL
|
|
5
|
+
);
|
|
6
|
+
|
|
7
|
+
-- CreateIndex
|
|
8
|
+
CREATE UNIQUE INDEX "_CamusatCountryToUser_AB_unique" ON "_CamusatCountryToUser"("A", "B");
|
|
9
|
+
|
|
10
|
+
-- CreateIndex
|
|
11
|
+
CREATE INDEX "_CamusatCountryToUser_B_index" ON "_CamusatCountryToUser"("B");
|
|
12
|
+
|
|
13
|
+
-- AddForeignKey
|
|
14
|
+
ALTER TABLE "_CamusatCountryToUser" ADD CONSTRAINT "_CamusatCountryToUser_A_fkey" FOREIGN KEY ("A") REFERENCES "CamusatCountry"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
15
|
+
|
|
16
|
+
-- AddForeignKey
|
|
17
|
+
ALTER TABLE "_CamusatCountryToUser" ADD CONSTRAINT "_CamusatCountryToUser_B_fkey" FOREIGN KEY ("B") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- The `actionDate` column on the `WorkOrderActivityLog` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "WorkOrderActivityLog" DROP COLUMN "actionDate",
|
|
9
|
+
ADD COLUMN "actionDate" TIMESTAMP(3);
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `brand` on the `Cable` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `capacity` on the `Cable` table. All the data in the column will be lost.
|
|
6
|
+
- You are about to drop the column `description` on the `Cable` table. All the data in the column will be lost.
|
|
7
|
+
- You are about to drop the column `fibersActive` on the `Cable` table. All the data in the column will be lost.
|
|
8
|
+
- You are about to drop the column `fibersDark` on the `Cable` table. All the data in the column will be lost.
|
|
9
|
+
- You are about to drop the column `fibersDedicated` on the `Cable` table. All the data in the column will be lost.
|
|
10
|
+
- You are about to drop the column `fibersReserved` on the `Cable` table. All the data in the column will be lost.
|
|
11
|
+
- You are about to drop the column `length` on the `Cable` table. All the data in the column will be lost.
|
|
12
|
+
- You are about to drop the column `type` on the `Cable` table. All the data in the column will be lost.
|
|
13
|
+
|
|
14
|
+
*/
|
|
15
|
+
-- AlterTable
|
|
16
|
+
ALTER TABLE "Cable" DROP COLUMN "brand",
|
|
17
|
+
DROP COLUMN "capacity",
|
|
18
|
+
DROP COLUMN "description",
|
|
19
|
+
DROP COLUMN "fibersActive",
|
|
20
|
+
DROP COLUMN "fibersDark",
|
|
21
|
+
DROP COLUMN "fibersDedicated",
|
|
22
|
+
DROP COLUMN "fibersReserved",
|
|
23
|
+
DROP COLUMN "length",
|
|
24
|
+
DROP COLUMN "type",
|
|
25
|
+
ADD COLUMN "attributes" JSONB,
|
|
26
|
+
ADD COLUMN "geometry" JSONB,
|
|
27
|
+
ADD COLUMN "photos" JSONB,
|
|
28
|
+
ADD COLUMN "projectId" TEXT,
|
|
29
|
+
ADD COLUMN "status" TEXT NOT NULL DEFAULT 'active',
|
|
30
|
+
ADD COLUMN "zone" JSONB,
|
|
31
|
+
ALTER COLUMN "name" DROP NOT NULL;
|
|
32
|
+
|
|
33
|
+
-- AlterTable
|
|
34
|
+
ALTER TABLE "CableAtttributes" ADD COLUMN "cableTemplateId" TEXT;
|
|
35
|
+
|
|
36
|
+
-- CreateTable
|
|
37
|
+
CREATE TABLE "CableTemplate" (
|
|
38
|
+
"id" TEXT NOT NULL,
|
|
39
|
+
"no" SERIAL NOT NULL,
|
|
40
|
+
"status" TEXT NOT NULL DEFAULT 'active',
|
|
41
|
+
"name" TEXT,
|
|
42
|
+
"photos" JSONB,
|
|
43
|
+
"zone" JSONB,
|
|
44
|
+
"geometry" JSONB,
|
|
45
|
+
"attributes" JSONB,
|
|
46
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
47
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
48
|
+
"deletedAt" TIMESTAMP(3),
|
|
49
|
+
"updatedById" TEXT,
|
|
50
|
+
"networkElementId" TEXT NOT NULL,
|
|
51
|
+
"projectId" TEXT,
|
|
52
|
+
|
|
53
|
+
CONSTRAINT "CableTemplate_pkey" PRIMARY KEY ("id")
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
-- CreateIndex
|
|
57
|
+
CREATE UNIQUE INDEX "CableTemplate_id_key" ON "CableTemplate"("id");
|
|
58
|
+
|
|
59
|
+
-- AddForeignKey
|
|
60
|
+
ALTER TABLE "Cable" ADD CONSTRAINT "Cable_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
61
|
+
|
|
62
|
+
-- AddForeignKey
|
|
63
|
+
ALTER TABLE "CableTemplate" ADD CONSTRAINT "CableTemplate_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
64
|
+
|
|
65
|
+
-- AddForeignKey
|
|
66
|
+
ALTER TABLE "CableTemplate" ADD CONSTRAINT "CableTemplate_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
67
|
+
|
|
68
|
+
-- AddForeignKey
|
|
69
|
+
ALTER TABLE "CableTemplate" ADD CONSTRAINT "CableTemplate_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
70
|
+
|
|
71
|
+
-- AddForeignKey
|
|
72
|
+
ALTER TABLE "CableAtttributes" ADD CONSTRAINT "CableAtttributes_cableTemplateId_fkey" FOREIGN KEY ("cableTemplateId") REFERENCES "CableTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- DropForeignKey
|
|
2
|
+
ALTER TABLE "CableAtttributes" DROP CONSTRAINT "CableAtttributes_cableId_fkey";
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE "CableAtttributes" ALTER COLUMN "cableId" DROP NOT NULL;
|
|
6
|
+
|
|
7
|
+
-- AddForeignKey
|
|
8
|
+
ALTER TABLE "CableAtttributes" ADD CONSTRAINT "CableAtttributes_cableId_fkey" FOREIGN KEY ("cableId") REFERENCES "Cable"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- The `visibleOnMobile` column on the `CableAtttributes` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "CableAtttributes" DROP COLUMN "visibleOnMobile",
|
|
9
|
+
ADD COLUMN "visibleOnMobile" BOOLEAN NOT NULL DEFAULT false;
|
package/prisma/migrations/20240919080014_create_cluster_and_central_office_tables/migration.sql
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
-- AlterTable
|
|
2
|
+
ALTER TABLE "User" ADD COLUMN "centralOfficeId" TEXT,
|
|
3
|
+
ADD COLUMN "clusterId" TEXT;
|
|
4
|
+
|
|
5
|
+
-- CreateTable
|
|
6
|
+
CREATE TABLE "CentralOffice" (
|
|
7
|
+
"id" TEXT NOT NULL,
|
|
8
|
+
"no" SERIAL NOT NULL,
|
|
9
|
+
"name" TEXT NOT NULL,
|
|
10
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
11
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
12
|
+
"deletedAt" TIMESTAMP(3),
|
|
13
|
+
"projectId" TEXT,
|
|
14
|
+
|
|
15
|
+
CONSTRAINT "CentralOffice_pkey" PRIMARY KEY ("id")
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
-- CreateTable
|
|
19
|
+
CREATE TABLE "Cluster" (
|
|
20
|
+
"id" TEXT NOT NULL,
|
|
21
|
+
"no" SERIAL NOT NULL,
|
|
22
|
+
"name" TEXT NOT NULL,
|
|
23
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
24
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
25
|
+
"deletedAt" TIMESTAMP(3),
|
|
26
|
+
"projectPhase" TEXT,
|
|
27
|
+
"centralOfficeId" TEXT,
|
|
28
|
+
|
|
29
|
+
CONSTRAINT "Cluster_pkey" PRIMARY KEY ("id")
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
-- CreateIndex
|
|
33
|
+
CREATE UNIQUE INDEX "CentralOffice_id_key" ON "CentralOffice"("id");
|
|
34
|
+
|
|
35
|
+
-- CreateIndex
|
|
36
|
+
CREATE UNIQUE INDEX "CentralOffice_name_key" ON "CentralOffice"("name");
|
|
37
|
+
|
|
38
|
+
-- CreateIndex
|
|
39
|
+
CREATE UNIQUE INDEX "Cluster_id_key" ON "Cluster"("id");
|
|
40
|
+
|
|
41
|
+
-- CreateIndex
|
|
42
|
+
CREATE UNIQUE INDEX "Cluster_name_key" ON "Cluster"("name");
|
|
43
|
+
|
|
44
|
+
-- AddForeignKey
|
|
45
|
+
ALTER TABLE "User" ADD CONSTRAINT "User_centralOfficeId_fkey" FOREIGN KEY ("centralOfficeId") REFERENCES "CentralOffice"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
46
|
+
|
|
47
|
+
-- AddForeignKey
|
|
48
|
+
ALTER TABLE "User" ADD CONSTRAINT "User_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
49
|
+
|
|
50
|
+
-- AddForeignKey
|
|
51
|
+
ALTER TABLE "CentralOffice" ADD CONSTRAINT "CentralOffice_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
52
|
+
|
|
53
|
+
-- AddForeignKey
|
|
54
|
+
ALTER TABLE "Cluster" ADD CONSTRAINT "Cluster_centralOfficeId_fkey" FOREIGN KEY ("centralOfficeId") REFERENCES "CentralOffice"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "qrCode" (
|
|
3
|
+
"id" TEXT NOT NULL,
|
|
4
|
+
"no" SERIAL NOT NULL,
|
|
5
|
+
"name" TEXT NOT NULL,
|
|
6
|
+
"prefix" TEXT NOT NULL,
|
|
7
|
+
"index" INTEGER NOT NULL,
|
|
8
|
+
"scanned" INTEGER NOT NULL DEFAULT 0,
|
|
9
|
+
"link" TEXT,
|
|
10
|
+
"tagDetails" JSONB,
|
|
11
|
+
"status" TEXT NOT NULL DEFAULT 'active',
|
|
12
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
13
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
14
|
+
"deletedAt" TIMESTAMP(3),
|
|
15
|
+
"projectId" TEXT,
|
|
16
|
+
"networkElementId" TEXT,
|
|
17
|
+
"cableId" TEXT,
|
|
18
|
+
"pboFatId" TEXT,
|
|
19
|
+
|
|
20
|
+
CONSTRAINT "qrCode_pkey" PRIMARY KEY ("id")
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
-- CreateIndex
|
|
24
|
+
CREATE UNIQUE INDEX "qrCode_id_key" ON "qrCode"("id");
|
|
25
|
+
|
|
26
|
+
-- CreateIndex
|
|
27
|
+
CREATE UNIQUE INDEX "qrCode_link_key" ON "qrCode"("link");
|
|
28
|
+
|
|
29
|
+
-- AddForeignKey
|
|
30
|
+
ALTER TABLE "qrCode" ADD CONSTRAINT "qrCode_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
31
|
+
|
|
32
|
+
-- AddForeignKey
|
|
33
|
+
ALTER TABLE "qrCode" ADD CONSTRAINT "qrCode_networkElementId_fkey" FOREIGN KEY ("networkElementId") REFERENCES "NetworkElement"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
34
|
+
|
|
35
|
+
-- AddForeignKey
|
|
36
|
+
ALTER TABLE "qrCode" ADD CONSTRAINT "qrCode_cableId_fkey" FOREIGN KEY ("cableId") REFERENCES "Cable"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
37
|
+
|
|
38
|
+
-- AddForeignKey
|
|
39
|
+
ALTER TABLE "qrCode" ADD CONSTRAINT "qrCode_pboFatId_fkey" FOREIGN KEY ("pboFatId") REFERENCES "PboFat"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "qrCodeTag" (
|
|
3
|
+
"id" TEXT NOT NULL,
|
|
4
|
+
"no" SERIAL NOT NULL,
|
|
5
|
+
"image" TEXT,
|
|
6
|
+
"link" TEXT,
|
|
7
|
+
"scanned" BOOLEAN NOT NULL DEFAULT false,
|
|
8
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
9
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
10
|
+
"deletedAt" TIMESTAMP(3),
|
|
11
|
+
"qrCodeId" TEXT NOT NULL,
|
|
12
|
+
|
|
13
|
+
CONSTRAINT "qrCodeTag_pkey" PRIMARY KEY ("id")
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
-- CreateIndex
|
|
17
|
+
CREATE UNIQUE INDEX "qrCodeTag_id_key" ON "qrCodeTag"("id");
|
|
18
|
+
|
|
19
|
+
-- CreateIndex
|
|
20
|
+
CREATE UNIQUE INDEX "qrCodeTag_link_key" ON "qrCodeTag"("link");
|
|
21
|
+
|
|
22
|
+
-- AddForeignKey
|
|
23
|
+
ALTER TABLE "qrCodeTag" ADD CONSTRAINT "qrCodeTag_qrCodeId_fkey" FOREIGN KEY ("qrCodeId") REFERENCES "qrCode"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "projectPhaseLog" (
|
|
3
|
+
"id" TEXT NOT NULL,
|
|
4
|
+
"no" SERIAL NOT NULL,
|
|
5
|
+
"projectId" TEXT NOT NULL,
|
|
6
|
+
"phase" TEXT NOT NULL,
|
|
7
|
+
"action" TEXT NOT NULL,
|
|
8
|
+
"comment" TEXT,
|
|
9
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
10
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
11
|
+
"deletedAt" TIMESTAMP(3),
|
|
12
|
+
"updatedById" TEXT,
|
|
13
|
+
|
|
14
|
+
CONSTRAINT "projectPhaseLog_pkey" PRIMARY KEY ("id")
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
-- CreateIndex
|
|
18
|
+
CREATE UNIQUE INDEX "projectPhaseLog_id_key" ON "projectPhaseLog"("id");
|
|
19
|
+
|
|
20
|
+
-- AddForeignKey
|
|
21
|
+
ALTER TABLE "projectPhaseLog" ADD CONSTRAINT "projectPhaseLog_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
22
|
+
|
|
23
|
+
-- AddForeignKey
|
|
24
|
+
ALTER TABLE "projectPhaseLog" ADD CONSTRAINT "projectPhaseLog_updatedById_fkey" FOREIGN KEY ("updatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- AlterTable
|
|
2
|
+
ALTER TABLE "qrCode" ADD COLUMN "cableTemplateId" TEXT,
|
|
3
|
+
ADD COLUMN "pboFatTemplateId" TEXT;
|
|
4
|
+
|
|
5
|
+
-- AddForeignKey
|
|
6
|
+
ALTER TABLE "qrCode" ADD CONSTRAINT "qrCode_pboFatTemplateId_fkey" FOREIGN KEY ("pboFatTemplateId") REFERENCES "PboFatTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
7
|
+
|
|
8
|
+
-- AddForeignKey
|
|
9
|
+
ALTER TABLE "qrCode" ADD CONSTRAINT "qrCode_cableTemplateId_fkey" FOREIGN KEY ("cableTemplateId") REFERENCES "CableTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|