Skip to content

Commit

Permalink
Dev Removed extended conditions feature (agreed with contributor on t…
Browse files Browse the repository at this point in the history
…his)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@9516 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Nov 22, 2010
1 parent 2644112 commit fe79c54
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 90 deletions.
13 changes: 0 additions & 13 deletions admin/install/create-mssql.sql
Expand Up @@ -49,19 +49,6 @@ CREATE TABLE [prefix_conditions] (
;


--
-- Table structure for table extendedconditions
--
CREATE TABLE [prefix_extendedconditions] (
[qid] INT NOT NULL default '0',
[gid] INT NOT NULL default '0',
[sid] INT NOT NULL default '0',
[condition] text ,
PRIMARY KEY ([qid],[gid],[sid])
)
;


--
-- Table structure for table defaultvalues
--
Expand Down
13 changes: 0 additions & 13 deletions admin/install/create-mssqlnative.sql
Expand Up @@ -52,19 +52,6 @@ CREATE TABLE [prefix_conditions] (
;


--
-- Table structure for table extendedconditions
--
CREATE TABLE [prefix_extendedconditions] (
[qid] INT NOT NULL default '0',
[gid] INT NOT NULL default '0',
[sid] INT NOT NULL default '0',
[condition] varchar(max) ,
PRIMARY KEY ([qid],[gid],[sid])
)
;


--
-- Table structure for table defaultvalues
--
Expand Down
12 changes: 0 additions & 12 deletions admin/install/create-mysql.sql
Expand Up @@ -45,18 +45,6 @@ CREATE TABLE `prefix_conditions` (
) ENGINE=$databasetabletype AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_unicode_ci;


--
-- Table structure for table extendedconditions
--
CREATE TABLE `prefix_extendedconditions` (
`qid` int(11) NOT NULL,
`gid` int(11) NOT NULL,
`sid` int(11) NOT NULL,
`condition` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`qid`,`gid`,`sid`)
) ENGINE=$databasetabletype AUTO_INCREMENT=1 CHARACTER SET=utf8 COLLATE utf8_unicode_ci;


--
-- Table structure for table defaultvalues
--
Expand Down
12 changes: 0 additions & 12 deletions admin/install/create-postgres.sql
Expand Up @@ -59,18 +59,6 @@ ALTER TABLE ONLY prefix_conditions
ADD CONSTRAINT prefix_conditions_pkey PRIMARY KEY (cid);


--
-- Table structure for table extendedconditions
--
CREATE TABLE prefix_extendedconditions (
qid integer DEFAULT 0 NOT NULL,
gid integer DEFAULT 0 NOT NULL,
sid integer DEFAULT 0 NOT NULL,
condition text);

ALTER TABLE prefix_extendedconditions ADD CONSTRAINT prefix_extendedconditions_pkey PRIMARY KEY (qid,gid,sid);


--
-- Table structure for table defaultvalues
--
Expand Down
14 changes: 1 addition & 13 deletions admin/update/upgrade-mssql.php
Expand Up @@ -400,12 +400,6 @@ function db_upgrade($oldversion) {
modify_database("", "create index [idx_expiry] on [prefix_sessions] ([expiry])"); echo $modifyoutput;
modify_database("", "create index [idx_expireref] on [prefix_sessions] ([expireref])"); echo $modifyoutput;
modify_database("", "UPDATE [prefix_settings_global] SET stg_value='143' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
modify_database("","CREATE TABLE [prefix_extendedconditions] (
[qid] INT NOT NULL default '0',
[gid] INT NOT NULL default '0',
[sid] INT NOT NULL default '0',
[condition] text ,
PRIMARY KEY ([qid],[gid],[sid]));"); echo $modifyoutput; flush();
}

if ($oldversion < 145) //Modify surveys table
Expand Down Expand Up @@ -447,13 +441,7 @@ function db_upgrade($oldversion) {

//Add index to questions table to speed up subquestions
modify_database("", "create index [parent_qid_idx] on [prefix_questions] ([parent_qid])"); echo $modifyoutput; flush();
modify_database("","CREATE TABLE prefix_extendedconditions (
qid integer NOT NULL,
gid integer NOT NULL,
sid integer NOT NULL,
condition text NOT NULL,
PRIMARY KEY (qid,gid,sid));"); echo $modifyoutput; flush();


modify_database("", "ALTER TABLE prefix_surveys ADD emailnotificationto text DEFAULT NULL"); echo $modifyoutput; flush();
upgrade_survey_table145();
mssql_drop_constraint('notification','surveys');
Expand Down
15 changes: 2 additions & 13 deletions admin/update/upgrade-mssqlnative.php
Expand Up @@ -400,12 +400,7 @@ function db_upgrade($oldversion) {
modify_database("", "create index [idx_expiry] on [prefix_sessions] ([expiry])"); echo $modifyoutput;
modify_database("", "create index [idx_expireref] on [prefix_sessions] ([expireref])"); echo $modifyoutput;
modify_database("", "UPDATE [prefix_settings_global] SET stg_value='143' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();
modify_database("","CREATE TABLE [prefix_extendedconditions] (
[qid] INT NOT NULL default '0',
[gid] INT NOT NULL default '0',
[sid] INT NOT NULL default '0',
[condition] varchar(max) ,
PRIMARY KEY ([qid],[gid],[sid]));"); echo $modifyoutput; flush();

}

if ($oldversion < 145) //Modify surveys table
Expand Down Expand Up @@ -447,13 +442,7 @@ function db_upgrade($oldversion) {

//Add index to questions table to speed up subquestions
modify_database("", "create index [parent_qid_idx] on [prefix_questions] ([parent_qid])"); echo $modifyoutput; flush();
modify_database("","CREATE TABLE prefix_extendedconditions (
qid integer NOT NULL,
gid integer NOT NULL,
sid integer NOT NULL,
condition text NOT NULL,
PRIMARY KEY (qid,gid,sid));"); echo $modifyoutput; flush();


modify_database("", "ALTER TABLE prefix_surveys ADD emailnotificationto text DEFAULT NULL"); echo $modifyoutput; flush();
upgrade_survey_table145();
mssql_drop_constraint('notification','surveys');
Expand Down
8 changes: 1 addition & 7 deletions admin/update/upgrade-mysql.php
Expand Up @@ -429,13 +429,7 @@ function db_upgrade($oldversion) {
//Add index to questions table to speed up subquestions
modify_database("", "create INDEX parent_qid_idx on prefix_questions( parent_qid );"); echo $modifyoutput; flush();

modify_database("", "CREATE TABLE `prefix_extendedconditions` (
`qid` int(11) NOT NULL,
`gid` int(11) NOT NULL,
`sid` int(11) NOT NULL,
`condition` text NOT NULL,
PRIMARY KEY (`qid`,`gid`,`sid`)) ENGINE=$databasetabletype CHARACTER SET utf8 COLLATE utf8_unicode_ci;"); echo $modifyoutput; flush();


modify_database("", "ALTER TABLE `prefix_surveys` ADD `emailnotificationto` text DEFAULT NULL AFTER `emailresponseto`"); echo $modifyoutput; flush();
upgrade_survey_table145();
modify_database("", "ALTER TABLE `prefix_surveys` DROP COLUMN `notification`"); echo $modifyoutput; flush();
Expand Down
8 changes: 1 addition & 7 deletions admin/update/upgrade-postgres.php
Expand Up @@ -270,13 +270,7 @@ function db_upgrade($oldversion) {

//Add index to questions table to speed up subquestions
modify_database("", "create INDEX parent_qid_idx on prefix_questions( parent_qid );"); echo $modifyoutput; flush();
modify_database("","CREATE TABLE prefix_extendedconditions (
qid integer NOT NULL,
gid integer NOT NULL,
sid integer NOT NULL,
condition text NOT NULL,
PRIMARY KEY (qid,gid,sid));"); echo $modifyoutput; flush();


modify_database("", "ALTER TABLE prefix_surveys ADD emailnotificationto text DEFAULT NULL"); echo $modifyoutput; flush();
upgrade_survey_table145();
modify_database("", "ALTER TABLE prefix_surveys DROP COLUMN notification"); echo $modifyoutput; flush();
Expand Down

0 comments on commit fe79c54

Please sign in to comment.