summaryrefslogtreecommitdiff
path: root/db/migrations/0258_odd_krista_starr.sql
blob: 81ae7d10021a65ac91526de6b491c37bb052b830 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CREATE TABLE "place_of_shipping" (
	"code" varchar(20) PRIMARY KEY NOT NULL,
	"description" varchar(255) NOT NULL,
	"is_active" boolean DEFAULT true NOT NULL,
	"created_by" integer,
	"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "combo_box_options" DISABLE ROW LEVEL SECURITY;--> statement-breakpoint
DROP TABLE "combo_box_options" CASCADE;--> statement-breakpoint
ALTER TABLE "document_number_type_configs" DROP CONSTRAINT "document_number_type_configs_document_class_id_document_classes_id_fk";
--> statement-breakpoint
ALTER TABLE "document_class_options_new" ADD COLUMN "description" varchar(100) NOT NULL;--> statement-breakpoint
ALTER TABLE "place_of_shipping" ADD CONSTRAINT "place_of_shipping_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "document_class_options_new" DROP COLUMN "option_value";--> statement-breakpoint
ALTER TABLE "document_class_options_new" DROP COLUMN "sort_order";--> statement-breakpoint
ALTER TABLE "document_number_type_configs" DROP COLUMN "document_class_id";--> statement-breakpoint
ALTER TABLE "document_class_options_new" ADD CONSTRAINT "unique_document_class_option" UNIQUE("document_class_id","option_code");--> statement-breakpoint
ALTER TABLE "document_classes" ADD CONSTRAINT "document_classes_value_unique" UNIQUE("value");--> statement-breakpoint
ALTER TABLE "ecc"."PR_INFORMATION_T_BID_HEADER" ADD CONSTRAINT "PR_INFORMATION_T_BID_HEADER_ANFNR_unique" UNIQUE("ANFNR");