diff options
Diffstat (limited to 'db/migrations/0294_melted_swordsman.sql')
| -rw-r--r-- | db/migrations/0294_melted_swordsman.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrations/0294_melted_swordsman.sql b/db/migrations/0294_melted_swordsman.sql new file mode 100644 index 00000000..b574c497 --- /dev/null +++ b/db/migrations/0294_melted_swordsman.sql @@ -0,0 +1,11 @@ +DROP VIEW "public"."basic_contract_view";--> statement-breakpoint +ALTER TABLE "users" ALTER COLUMN "phone" SET DATA TYPE varchar(255);--> statement-breakpoint +ALTER TABLE "basic_contract_templates" DROP COLUMN "shipbuilding_applicable";--> statement-breakpoint +ALTER TABLE "basic_contract_templates" DROP COLUMN "wind_applicable";--> statement-breakpoint +ALTER TABLE "basic_contract_templates" DROP COLUMN "pc_applicable";--> statement-breakpoint +ALTER TABLE "basic_contract_templates" DROP COLUMN "nb_applicable";--> statement-breakpoint +ALTER TABLE "basic_contract_templates" DROP COLUMN "rc_applicable";--> statement-breakpoint +ALTER TABLE "basic_contract_templates" DROP COLUMN "gy_applicable";--> statement-breakpoint +ALTER TABLE "basic_contract_templates" DROP COLUMN "sys_applicable";--> statement-breakpoint +ALTER TABLE "basic_contract_templates" DROP COLUMN "infra_applicable";--> statement-breakpoint +CREATE VIEW "public"."basic_contract_view" AS (select "basic_contract"."id" as "id", "basic_contract"."template_id" as "template_id", "basic_contract"."vendor_id" as "vendor_id", "basic_contract"."requested_by" as "requested_by", "basic_contract"."status" as "basic_contract_status", "basic_contract"."created_at" as "created_at", "basic_contract"."updated_at" as "updated_at", "basic_contract"."completed_at" as "completed_at", "vendors"."vendor_code" as "vendor_code", "vendors"."email" as "vendor_email", "vendors"."vendor_name" as "vendor_name", "users"."name" as "requested_by_name", "basic_contract_templates"."template_name" as "template_name", "basic_contract_templates"."revision" as "template_revision", "basic_contract_templates"."status" as "template_status", "basic_contract_templates"."validity_period" as "validity_period", "basic_contract_templates"."legal_review_required" as "legal_review_required", "basic_contract_templates"."file_path" as "template_file_path", "basic_contract_templates"."file_name" as "template_file_name", "basic_contract"."file_path" as "signed_file_path", "basic_contract"."file_name" as "signed_file_name", "basic_contract_templates"."created_at" as "template_created_at", "basic_contract_templates"."created_by" as "template_created_by", "basic_contract_templates"."updated_at" as "template_updated_at", "basic_contract_templates"."updated_by" as "template_updated_by", "basic_contract_templates"."disposed_at" as "template_disposed_at", "basic_contract_templates"."restored_at" as "template_restored_at" from "basic_contract" left join "vendors" on "basic_contract"."vendor_id" = "vendors"."id" left join "users" on "basic_contract"."requested_by" = "users"."id" left join "basic_contract_templates" on "basic_contract"."template_id" = "basic_contract_templates"."id");
\ No newline at end of file |
