maj du schema de bdd pour la creation des forms et l'enregistrement des resultats
This commit is contained in:
parent
a19c7d4d35
commit
29ee5a8968
1 changed files with 18 additions and 14 deletions
|
@ -48,8 +48,15 @@ function gamuform_declarer_tables_objets_sql($tables) {
|
||||||
'field'=> array(
|
'field'=> array(
|
||||||
'id_gamuform' => 'bigint(21) NOT NULL',
|
'id_gamuform' => 'bigint(21) NOT NULL',
|
||||||
'titre' => 'varchar(255) NOT NULL DEFAULT ""',
|
'titre' => 'varchar(255) NOT NULL DEFAULT ""',
|
||||||
'date' => 'datetime NOT NULL DEFAULT "0000-00-00 00:00:00"',
|
'label' => 'varchar(255) NOT NULL DEFAULT ""',
|
||||||
|
'type' => 'varchar(255) NOT NULL DEFAULT ""',
|
||||||
|
'class_container' => 'varchar(255) NOT NULL DEFAULT ""',
|
||||||
|
'class' => 'varchar(255) NOT NULL DEFAULT ""',
|
||||||
|
'choix' => "text NOT NULL",
|
||||||
|
'defaut' => 'varchar(255) NOT NULL DEFAULT ""',
|
||||||
'statut' => 'varchar(20) DEFAULT "0" NOT NULL',
|
'statut' => 'varchar(20) DEFAULT "0" NOT NULL',
|
||||||
|
'date' => 'datetime NOT NULL DEFAULT "0000-00-00 00:00:00"',
|
||||||
|
'rang' => 'tinyint(4) NOT NULL',
|
||||||
'maj' => 'TIMESTAMP'
|
'maj' => 'TIMESTAMP'
|
||||||
),
|
),
|
||||||
'key' => array(
|
'key' => array(
|
||||||
|
@ -58,23 +65,19 @@ function gamuform_declarer_tables_objets_sql($tables) {
|
||||||
),
|
),
|
||||||
'titre' => 'titre AS titre, "" AS lang',
|
'titre' => 'titre AS titre, "" AS lang',
|
||||||
'date' => 'date',
|
'date' => 'date',
|
||||||
'champs_editables' => array('titre'),
|
//'champs_editables' => array('titre'),
|
||||||
'champs_versionnes' => array('titre'),
|
//'champs_versionnes' => array('titre'),
|
||||||
'rechercher_champs' => array(),
|
//'rechercher_champs' => array(),
|
||||||
'tables_jointures' => array('spip_gamuforms_liens'),
|
'tables_jointures' => array('spip_gamuforms_liens'),
|
||||||
'statut_textes_instituer' => array(
|
'statut_textes_instituer' => array(
|
||||||
'prepa' => 'texte_statut_en_cours_redaction',
|
'prepa' => 'texte_statut_en_cours_redaction',
|
||||||
'prop' => 'texte_statut_propose_evaluation',
|
|
||||||
'publie' => 'texte_statut_publie',
|
'publie' => 'texte_statut_publie',
|
||||||
'refuse' => 'texte_statut_refuse',
|
|
||||||
'poubelle' => 'texte_statut_poubelle',
|
'poubelle' => 'texte_statut_poubelle',
|
||||||
),
|
),
|
||||||
'statut'=> array(
|
'statut'=> array(
|
||||||
array(
|
array(
|
||||||
'champ' => 'statut',
|
'champ' => 'statut',
|
||||||
'publie' => 'publie',
|
'publie' => 'publie',
|
||||||
'previsu' => 'publie,prop,prepa',
|
|
||||||
'post_date' => 'date',
|
|
||||||
'exception' => array('statut','tout')
|
'exception' => array('statut','tout')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
@ -103,10 +106,11 @@ function gamuform_declarer_tables_auxiliaires($tables) {
|
||||||
'id_gamuform' => 'bigint(21) DEFAULT "0" NOT NULL',
|
'id_gamuform' => 'bigint(21) DEFAULT "0" NOT NULL',
|
||||||
'id_objet' => 'bigint(21) DEFAULT "0" NOT NULL',
|
'id_objet' => 'bigint(21) DEFAULT "0" NOT NULL',
|
||||||
'objet' => 'VARCHAR(25) DEFAULT "" NOT NULL',
|
'objet' => 'VARCHAR(25) DEFAULT "" NOT NULL',
|
||||||
'vu' => 'VARCHAR(6) DEFAULT "non" NOT NULL',
|
'type' => 'VARCHAR(6) DEFAULT "form" NOT NULL',
|
||||||
|
'valeur' => "text NOT NULL",
|
||||||
),
|
),
|
||||||
'key' => array(
|
'key' => array(
|
||||||
'PRIMARY KEY' => 'id_gamuform,id_objet,objet',
|
'PRIMARY KEY' => 'id_gamuform,id_objet,objet,type',
|
||||||
'KEY id_gamuform' => 'id_gamuform',
|
'KEY id_gamuform' => 'id_gamuform',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue