-- use database;


-- Nouveau champ users.site_id

ALTER TABLE users 
ADD site_id INT(11) NULL DEFAULT NULL AFTER role,
ADD CONSTRAINT fk_user_site FOREIGN KEY (site_id) REFERENCES sites(id)
ON DELETE NO ACTION ON UPDATE NO ACTION;


-- Nouveau champ materiels.is_site_only
ALTER TABLE materiels ADD is_site_only BOOLEAN NOT NULL DEFAULT FALSE COMMENT 'réservé au site' AFTER site_id; 
