mini-DMS: Filesystem-Backend: ungeänderte Dokumente nicht doppelt speichern.
[kivitendo-erp.git] / sql / Pg-upgrade2 / oe_delivery_orders_foreign_keys.sql
index 2e2e8c9..9ad72df 100644 (file)
@@ -1,7 +1,6 @@
 -- @tag: oe_delivery_orders_foreign_keys
 -- @description: Fremdschlüsseldefinitionen für oe und delivery_orders
 -- @depends: release_3_0_0
--- @charset: utf-8
 ALTER TABLE oe ALTER COLUMN department_id DROP DEFAULT;
 
 UPDATE oe              SET cp_id                = NULL WHERE (cp_id                IS NOT NULL) AND (cp_id                NOT IN (SELECT cp_id     FROM contacts));
@@ -19,7 +18,6 @@ ALTER TABLE oe              ADD FOREIGN KEY (cp_id)                REFERENCES co
 ALTER TABLE oe              ADD FOREIGN KEY (delivery_customer_id) REFERENCES customer      (id);
 ALTER TABLE oe              ADD FOREIGN KEY (delivery_vendor_id)   REFERENCES vendor        (id);
 ALTER TABLE oe              ADD FOREIGN KEY (department_id)        REFERENCES department    (id);
-ALTER TABLE oe              ADD FOREIGN KEY (employee_id)          REFERENCES employee      (id);
 ALTER TABLE oe              ADD FOREIGN KEY (language_id)          REFERENCES language      (id);
 ALTER TABLE oe              ADD FOREIGN KEY (payment_id)           REFERENCES payment_terms (id);
 ALTER TABLE oe              ADD FOREIGN KEY (shipto_id)            REFERENCES shipto        (shipto_id);