Skip to content

Commit

Permalink
BIB_programmes - Renommer champs sitpn fix #68 et cf#63 - ajout d'un …
Browse files Browse the repository at this point in the history
…champ 'actif' pour indiquer quel programme doit apparaitre dans la 'Comment ?' de la synthèse
  • Loading branch information
gildeluermoz committed Nov 2, 2015
1 parent f7e8281 commit 2b84966
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cache/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*
*.*
1 change: 1 addition & 0 deletions config/doctrine/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ BibProgrammes:
primary: true
nom_programme: string(255)
desc_programme: string()
actif: boolean(1)
BibProgrammesFs:
tableName: florestation.bib_programmes_fs
columns:
Expand Down
12 changes: 6 additions & 6 deletions data/2154/data_synthese_2154.sql
Original file line number Diff line number Diff line change
Expand Up @@ -613,13 +613,13 @@ INSERT INTO t_precisions (id_precision, nom_precision, desc_precision) VALUES (3
-- Data for Name: bib_programmes; Type: TABLE DATA; Schema: meta; Owner: -
--
--faune
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (3, 'Contact invertébrés', 'Contact aléatoire de la faune invertébrée.', true, 'Contact aléatoire de la faune invertébrée.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (1, 'Contact vertébrés', 'Contact aléatoire de la faune vertébrée.', true, 'Contact aléatoire de la faune vertébrée.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (2, 'Mortalité', 'Données issue du protocole mortalité.', true, 'Données issue du protocole mortalité.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, actif, programme_public, desc_programme_public) VALUES (3, 'Contact invertébrés', 'Contact aléatoire de la faune invertébrée.', true, true, 'Contact aléatoire de la faune invertébrée.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, programme_public, desc_programme_public) VALUES (1, 'Contact vertébrés', 'Contact aléatoire de la faune vertébrée.', true, true, 'Contact aléatoire de la faune vertébrée.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, programme_public, desc_programme_public) VALUES (2, 'Mortalité', 'Données issue du protocole mortalité.', true, true, 'Données issue du protocole mortalité.');
--flore
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (4, 'Flore prioritaire', 'Inventaire et suivi en présence absence de la Flore prioritaire.', true, 'Inventaire et suivi en présence absence de la Flore prioritaire.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (5, 'Flore station', 'Relevés stationnels et stratifiés de la flore.', true, 'Relevés stationnels et stratifiés de la flore.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (6, 'Bryophytes', 'Relevés stationnels et non stratifiés de la flore bryophyte.', true, 'Relevés stationnels et non stratifiés de la flore bryophyte.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, actif, programme_public, desc_programme_public) VALUES (4, 'Flore prioritaire', 'Inventaire et suivi en présence absence de la Flore prioritaire.', true, true, 'Inventaire et suivi en présence absence de la Flore prioritaire.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, actif, programme_public, desc_programme_public) VALUES (5, 'Flore station', 'Relevés stationnels et stratifiés de la flore.', true, true, 'Relevés stationnels et stratifiés de la flore.');
INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, actif, programme_public, desc_programme_public) VALUES (6, 'Bryophytes', 'Relevés stationnels et non stratifiés de la flore bryophyte.', true, true, 'Relevés stationnels et non stratifiés de la flore bryophyte.');

--
-- TOC entry 3370 (class 0 OID 55751)
Expand Down
5 changes: 3 additions & 2 deletions data/2154/synthese_2154.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4171,8 +4171,9 @@ CREATE TABLE bib_programmes (
id_programme integer NOT NULL,
nom_programme character varying(255),
desc_programme text,
sitpn boolean,
desc_programme_sitpn text
actif boolean,
programme_public boolean,
desc_programme_public text
);

--
Expand Down
3 changes: 2 additions & 1 deletion lib/model/doctrine/BibProgrammesTable.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public static function listProgrammes()
{
$query = Doctrine_Query::create()
->select('id_programme, nom_programme, desc_programme')
->from('BibProgrammes')
->from('BibProgrammes')
->where('actif = true')
->orderBy('nom_programme ASC');
$programmes = $query->fetchArray();
return $programmes;
Expand Down
7 changes: 7 additions & 0 deletions lib/model/doctrine/base/BaseBibProgrammes.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
* @property integer $id_programme
* @property string $nom_programme
* @property string $desc_programme
* @property boolean $actif
* @property Doctrine_Collection $BibLots
*
* @method integer getIdProgramme() Returns the current record's "id_programme" value
* @method string getNomProgramme() Returns the current record's "nom_programme" value
* @method string getDescProgramme() Returns the current record's "desc_programme" value
* @method boolean getActif() Returns the current record's "actif" value
* @method Doctrine_Collection getBibLots() Returns the current record's "BibLots" collection
* @method BibProgrammes setIdProgramme() Sets the current record's "id_programme" value
* @method BibProgrammes setNomProgramme() Sets the current record's "nom_programme" value
* @method BibProgrammes setDescProgramme() Sets the current record's "desc_programme" value
* @method BibProgrammes setActif() Sets the current record's "actif" value
* @method BibProgrammes setBibLots() Sets the current record's "BibLots" collection
*
* @package geonature
Expand All @@ -42,6 +45,10 @@ public function setTableDefinition()
'type' => 'string',
'length' => '',
));
$this->hasColumn('actif', 'boolean', 1, array(
'type' => 'boolean',
'length' => 1,
));
}

public function setUp()
Expand Down
4 changes: 2 additions & 2 deletions lib/model/doctrine/base/BaseTStationsBryo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ public function setTableDefinition()
'type' => 'integer',
'length' => 4,
));
$this->hasColumn('info_acces', 'string', 255, array(
$this->hasColumn('info_acces', 'string', 1000, array(
'type' => 'string',
'length' => 255,
'length' => 1000,
));
$this->hasColumn('complet_partiel', 'string', 1, array(
'type' => 'string',
Expand Down
4 changes: 2 additions & 2 deletions lib/model/doctrine/base/BaseTStationsFs.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ public function setTableDefinition()
'notnull' => true,
'length' => 25,
));
$this->hasColumn('info_acces', 'string', 1000, array(
$this->hasColumn('info_acces', 'string', 255, array(
'type' => 'string',
'length' => 1000,
'length' => 255,
));
$this->hasColumn('complet_partiel', 'string', 1, array(
'type' => 'string',
Expand Down

0 comments on commit 2b84966

Please sign in to comment.