importzugferd/sql/llx_importzugferd_datanorm.key.sql
data 47fbc561f6 Version 3.3
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:38:09 +01:00

13 lines
1,013 B
SQL
Executable file

-- ============================================================================
-- Copyright (C) 2026 ZUGFeRD Import Module
-- ============================================================================
ALTER TABLE llx_importzugferd_datanorm ADD INDEX idx_datanorm_fk_soc (fk_soc);
ALTER TABLE llx_importzugferd_datanorm ADD INDEX idx_datanorm_article_number (article_number);
ALTER TABLE llx_importzugferd_datanorm ADD INDEX idx_datanorm_ean (ean);
ALTER TABLE llx_importzugferd_datanorm ADD INDEX idx_datanorm_manufacturer_ref (manufacturer_ref);
ALTER TABLE llx_importzugferd_datanorm ADD INDEX idx_datanorm_matchcode (matchcode);
ALTER TABLE llx_importzugferd_datanorm ADD UNIQUE INDEX uk_datanorm_soc_article (fk_soc, article_number, entity);
ALTER TABLE llx_importzugferd_datanorm ADD CONSTRAINT fk_datanorm_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
ALTER TABLE llx_importzugferd_datanorm ADD CONSTRAINT fk_datanorm_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);