CREATE TABLE ec_user_session_offer_codes (
user_session_id integer NOT NULL,
product_id integer NOT NULL,
offer_code varchar(20) NOT NULL,
PRIMARY KEY (user_session_id,product_id),
CONSTRAINT ec_user_session_offer_code_pkey REFERENCES ec_products (),
CONSTRAINT ec_user_session_offer_codes_product_id_fkey REFERENCES ec_products (),
CONSTRAINT ec_user_session_offer_codes_user_session_id_fkey REFERENCES ec_products (),
CONSTRAINT ec_user_session_offer_codes_user_session_id_fkey REFERENCES ec_user_sessions (),
CONSTRAINT ec_user_session_offer_code_pkey REFERENCES ec_user_sessions (),
CONSTRAINT ec_user_session_offer_codes_product_id_fkey REFERENCES ec_user_sessions ()
);
CREATE INDEX ec_u_s_offer_codes_by_p_id ON ec_user_session_offer_codes (product_id);
CREATE INDEX ec_u_s_offer_codes_by_u_s_id ON ec_user_session_offer_codes (user_session_id);
CREATE TRIGGER RI_ConstraintTrigger_c_342339 AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_ins (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_342340 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_342344 AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_ins (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_342345 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_upd (disabled)
-- Table size: 0 bytes
-- Table rows: 0
Tables: