-- ============================================================================
-- Copyright (C) 2025 Alexandre Richert <a.richert@mca24.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
-- ============================================================================

--
-- Clés et index pour la table llx_crm_propal_stcomm
--

ALTER TABLE llx_crm_propal_stcomm ADD INDEX idx_crm_propal_stcomm_fk_propal (fk_propal);
ALTER TABLE llx_crm_propal_stcomm ADD INDEX idx_crm_propal_stcomm_fk_stcomm (fk_stcomm);
ALTER TABLE llx_crm_propal_stcomm ADD UNIQUE INDEX uk_crm_propal_stcomm_propal (fk_propal);

ALTER TABLE llx_crm_propal_stcomm ADD CONSTRAINT fk_crm_propal_stcomm_propal FOREIGN KEY (fk_propal) REFERENCES llx_propal (rowid);
ALTER TABLE llx_crm_propal_stcomm ADD CONSTRAINT fk_crm_propal_stcomm_stcomm FOREIGN KEY (fk_stcomm) REFERENCES llx_c_stcomm (id);
ALTER TABLE llx_crm_propal_stcomm ADD CONSTRAINT fk_crm_propal_stcomm_user FOREIGN KEY (fk_user_change) REFERENCES llx_user (rowid);
