Skip to content

Commit

Permalink
SQL - identification des sources validables
Browse files Browse the repository at this point in the history
  • Loading branch information
gildeluermoz committed Nov 22, 2018
1 parent c5a92c2 commit 2557ba9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/core/synthese.sql
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ CREATE TABLE t_sources (
desc_source text,
entity_source_pk_field character varying(255),
url_source character varying(255),
validable boolean NOT NULL DEFAULT true,
meta_create_date timestamp without time zone DEFAULT now(),
meta_update_date timestamp without time zone DEFAULT now()
);
Expand Down
6 changes: 6 additions & 0 deletions data/migrations/2.0.0rc3.1-to-2.0.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ WHERE id_source = (SELECT id_source FROM gn_synthese.t_sources WHERE name_source
--Si vous avez insérer des données provenant d'une autre source que occtax,
--vous devez gérer vous même le champ id_module des enregistrements correspondants.

ALTER TABLE gn_synthese.t_sources ADD COLUMN validable boolean;
ALTER TABLE gn_synthese.t_sources ALTER COLUMN validable SET DEFAULT true;
COMMENT ON COLUMN gn_synthese.t_sources.validable IS 'Définir si la validation des données d''une source est possile ou non';
UPDATE gn_synthese.t_sources SET validable = true;
ALTER TABLE gn_synthese.t_sources ALTER COLUMN validable SET NOT NULL;

CREATE OR REPLACE FUNCTION gn_synthese.get_ids_synthese_for_user_action(myuser integer, myaction text)
RETURNS integer[] AS
$BODY$
Expand Down

0 comments on commit 2557ba9

Please sign in to comment.