);
COMMENT ON TABLE events.events_statut IS 'Spécialisation des pages d''evenements à certains statuts d''usagers';
END IF;
+ -- Ajout d'une colonne lis_locked à la table liste
+ IF NOT EXISTS (SELECT 1 FROM information_schema.columns
+ WHERE table_schema = 'liste' AND
+ table_name = 'liste' AND
+ column_name = 'lis_locked') THEN
+ ALTER TABLE liste.liste ADD COLUMN lis_locked boolean DEFAULT false;
+ END IF;
+
+ -- Ajout table liste_statut au schéma liste
+ IF NOT EXISTS (SELECT 1 FROM information_schema.tables
+ WHERE table_schema = 'liste' AND
+ table_name = 'liste_statut') THEN
+ CREATE TABLE liste.liste_statut (
+ lst_id serial NOT NULL PRIMARY KEY,
+ lis_id integer,
+ sta_id integer,
+ CONSTRAINT liste_statut_lis_id_fkey FOREIGN KEY (lis_id)
+ REFERENCES liste.liste (lis_id) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION
+ );
+ COMMENT ON TABLE liste.liste_statut IS 'Spécialisation des pages de liste à certains statuts d''usagers';
+ END IF;
END;
$$;