CREATE TABLE ec_customer_serv_interactions (
interaction_id integer PRIMARY KEY NOT NULL,
customer_service_rep integer,
user_identification_id integer NOT NULL,
interaction_date timestamptz,
interaction_originator varchar(20) NOT NULL,
interaction_type varchar(30) NOT NULL,
interaction_headers varchar(4000),
CONSTRAINT ec_customer_serv_interacti_pkey REFERENCES users (),
CONSTRAINT ec_customer_serv_interactions_customer_service_rep_fkey REFERENCES users (),
CONSTRAINT ec_customer_serv_interactions_user_identification_id_fkey REFERENCES users (),
CONSTRAINT ec_customer_serv_interactions_user_identification_id_fkey REFERENCES ec_user_identification (),
CONSTRAINT ec_customer_serv_interacti_pkey REFERENCES ec_user_identification (),
CONSTRAINT ec_customer_serv_interactions_customer_service_rep_fkey REFERENCES ec_user_identification ()
);
CREATE INDEX ec_csin_by_user_ident_id ON ec_customer_serv_interactions (user_identification_id);
CREATE TRIGGER ec_cs_interaction_inserts AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE ec_cs_interaction_inserts (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_341804 AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_ins (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_341805 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_341809 AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_ins (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_341810 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_341812 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_341813 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
-- Tables with foreign keys that refer to ec_customer_serv_interactions:
--ec_customer_service_actions(ec_customer_serv_interacti_pkey)
--ec_customer_service_actions(ec_customer_serv_interactions_customer_service_rep_fkey)
--ec_customer_service_actions(ec_customer_serv_interactions_user_identification_id_fkey)
-- Table size: 0 bytes
-- Table rows: 0
Tables: