Prepare module opensurvey for 'Form' type.
This commit is contained in:
parent
d5b77bdc5f
commit
81f0b516b9
@ -251,3 +251,30 @@ CREATE TABLE llx_product_pricerules
|
|||||||
);
|
);
|
||||||
ALTER TABLE llx_product ADD COLUMN price_autogen TINYINT(1) DEFAULT 0;
|
ALTER TABLE llx_product ADD COLUMN price_autogen TINYINT(1) DEFAULT 0;
|
||||||
ALTER TABLE llx_product_pricerules ADD CONSTRAINT unique_level UNIQUE (level);
|
ALTER TABLE llx_product_pricerules ADD CONSTRAINT unique_level UNIQUE (level);
|
||||||
|
|
||||||
|
|
||||||
|
-- Delete deprecated fields
|
||||||
|
ALTER TABLE llx_opensurvey_sondage DROP COLUMN survey_link_visible;
|
||||||
|
ALTER TABLE llx_opensurvey_sondage DROP INDEX idx_id_sondage_admin;
|
||||||
|
ALTER TABLE llx_opensurvey_sondage DROP COLUMN id_sondage_admin;
|
||||||
|
ALTER TABLE llx_opensurvey_sondage DROP COLUMN canedit;
|
||||||
|
ALTER TABLE llx_opensurvey_sondage DROP COLUMN origin;
|
||||||
|
|
||||||
|
DROP TABLE llx_opensurvey_sujet_studs;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE llx_opensurvey_formquestions (
|
||||||
|
rowid INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||||
|
id_sondage VARCHAR(16),
|
||||||
|
question TEXT,
|
||||||
|
available_answers TEXT -- List of available answers
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
CREATE TABLE llx_opensurvey_user_formanswers (
|
||||||
|
fk_user_survey INTEGER NOT NULL,
|
||||||
|
fk_question INTEGER NOT NULL,
|
||||||
|
reponses TEXT
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
24
htdocs/install/mysql/tables/llx_opensurvey_formquestions.sql
Normal file
24
htdocs/install/mysql/tables/llx_opensurvey_formquestions.sql
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
CREATE TABLE llx_opensurvey_formquestions (
|
||||||
|
rowid INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||||
|
id_sondage VARCHAR(16),
|
||||||
|
question TEXT,
|
||||||
|
available_answers TEXT -- List of available answers
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
@ -24,10 +24,10 @@ CREATE TABLE llx_opensurvey_sondage (
|
|||||||
fk_user_creat integer NOT NULL,
|
fk_user_creat integer NOT NULL,
|
||||||
titre TEXT NOT NULL,
|
titre TEXT NOT NULL,
|
||||||
date_fin DATETIME NOT NULL,
|
date_fin DATETIME NOT NULL,
|
||||||
format VARCHAR(2) NOT NULL,
|
format VARCHAR(2) NOT NULL, -- 'A' = Text choice (choices are saved into sujet field), 'D' = Date choice (choices are saved into sujet field), 'F' = Form survey
|
||||||
mailsonde tinyint NOT NULL DEFAULT 0,
|
mailsonde tinyint NOT NULL DEFAULT 0,
|
||||||
allow_comments tinyint NOT NULL DEFAULT 1,
|
allow_comments tinyint NOT NULL DEFAULT 1,
|
||||||
allow_spy tinyint NOT NULL DEFAULT 1,
|
allow_spy tinyint NOT NULL DEFAULT 1,
|
||||||
tms TIMESTAMP,
|
tms TIMESTAMP,
|
||||||
sujet TEXT
|
sujet TEXT, -- Not filled if format = 'F'. Question are into table llx_opensurvey_formquestions
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
CREATE TABLE llx_opensurvey_user_formanswers (
|
||||||
|
fk_user_survey INTEGER NOT NULL,
|
||||||
|
fk_question INTEGER NOT NULL,
|
||||||
|
reponses TEXT
|
||||||
|
) ENGINE=InnoDB;
|
||||||
@ -19,6 +19,6 @@ CREATE TABLE llx_opensurvey_user_studs (
|
|||||||
id_users INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
id_users INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
nom VARCHAR(64) NOT NULL,
|
nom VARCHAR(64) NOT NULL,
|
||||||
id_sondage VARCHAR(16) NOT NULL,
|
id_sondage VARCHAR(16) NOT NULL,
|
||||||
reponses VARCHAR(100) NOT NULL,
|
reponses VARCHAR(100) NOT NULL, -- Not used for 'F' surveys
|
||||||
tms timestamp
|
tms timestamp
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user