maj du schema de bdd pour la creation des forms et l'enregistrement des resultats

This commit is contained in:
Christophe 2020-03-30 15:45:35 +02:00
parent a19c7d4d35
commit 29ee5a8968

View file

@ -48,8 +48,15 @@ function gamuform_declarer_tables_objets_sql($tables) {
'field'=> array(
'id_gamuform' => 'bigint(21) NOT NULL',
'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',
'date' => 'datetime NOT NULL DEFAULT "0000-00-00 00:00:00"',
'rang' => 'tinyint(4) NOT NULL',
'maj' => 'TIMESTAMP'
),
'key' => array(
@ -58,23 +65,19 @@ function gamuform_declarer_tables_objets_sql($tables) {
),
'titre' => 'titre AS titre, "" AS lang',
'date' => 'date',
'champs_editables' => array('titre'),
'champs_versionnes' => array('titre'),
'rechercher_champs' => array(),
//'champs_editables' => array('titre'),
//'champs_versionnes' => array('titre'),
//'rechercher_champs' => array(),
'tables_jointures' => array('spip_gamuforms_liens'),
'statut_textes_instituer' => array(
'prepa' => 'texte_statut_en_cours_redaction',
'prop' => 'texte_statut_propose_evaluation',
'publie' => 'texte_statut_publie',
'refuse' => 'texte_statut_refuse',
'poubelle' => 'texte_statut_poubelle',
),
'statut'=> array(
array(
'champ' => 'statut',
'publie' => 'publie',
'previsu' => 'publie,prop,prepa',
'post_date' => 'date',
'exception' => array('statut','tout')
)
),
@ -103,10 +106,11 @@ function gamuform_declarer_tables_auxiliaires($tables) {
'id_gamuform' => 'bigint(21) DEFAULT "0" NOT NULL',
'id_objet' => 'bigint(21) DEFAULT "0" 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(
'PRIMARY KEY' => 'id_gamuform,id_objet,objet',
'PRIMARY KEY' => 'id_gamuform,id_objet,objet,type',
'KEY id_gamuform' => 'id_gamuform',
)
);