Files
pkg_circolari/administrator/sql/updates/1.1.8.sql

16 lines
732 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

DROP TABLE IF EXISTS `#__circolari_firme`;
CREATE TABLE `#__circolari_firme` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`circolare_id` INT(11) UNSIGNED NOT NULL,
`user_id` INT(11) UNSIGNED NOT NULL,
`firmatipo_bottone_id` INT(11) UNSIGNED NOT NULL, -- id del bottone scelto
`firma_label` VARCHAR(190) NOT NULL, -- copia delletichetta al momento della firma
`data_firma` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `firma_unica` (`circolare_id`, `user_id`), -- 1 firma per utente x circolare
KEY `idx_circolare` (`circolare_id`),
KEY `idx_user` (`user_id`),
KEY `idx_bottone` (`firmatipo_bottone_id`)
) ENGINE=InnoDB DEFAULT COLLATE=utf8mb4_unicode_ci;