summaryrefslogtreecommitdiff
path: root/db/migrations/0258_odd_krista_starr.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrations/0258_odd_krista_starr.sql')
-rw-r--r--db/migrations/0258_odd_krista_starr.sql20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrations/0258_odd_krista_starr.sql b/db/migrations/0258_odd_krista_starr.sql
new file mode 100644
index 00000000..81ae7d10
--- /dev/null
+++ b/db/migrations/0258_odd_krista_starr.sql
@@ -0,0 +1,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"); \ No newline at end of file