Skip to content

Commit

Permalink
Dev Removed obsolete tables
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed May 8, 2012
1 parent 684b662 commit 3ee4e4f
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 96 deletions.
14 changes: 1 addition & 13 deletions admin/install/create-mssql.sql
Expand Up @@ -369,19 +369,7 @@ CREATE TABLE [prefix_survey_permissions] (
PRIMARY KEY ([sid], [uid],[permission])
);


--
-- Table structure for table survey_url_parameters
--
CREATE TABLE prefix_survey_url_parameters (
[id] INT NOT NULL IDENTITY (1,1) PRIMARY KEY,
[sid] INT NOT NULL,
[parameter] VARCHAR(50) NOT NULL,
[targetqid] INT NULL,
[targetsqid] INT NULL
);



--
-- Table structure for table user_groups
--
Expand Down
12 changes: 1 addition & 11 deletions admin/install/create-mssqlnative.sql
Expand Up @@ -372,17 +372,7 @@ CREATE TABLE [prefix_survey_permissions] (
);


--
-- Table structure for table survey_url_parameters
--
CREATE TABLE prefix_survey_url_parameters (
[id] INT NOT NULL IDENTITY (1,1) PRIMARY KEY,
[sid] INT NOT NULL,
[parameter] VARCHAR(50) NOT NULL,
[targetqid] INT NULL,
[targetsqid] INT NULL
);



--
-- Table structure for table user_groups
Expand Down
11 changes: 0 additions & 11 deletions admin/install/create-mysql.sql
Expand Up @@ -357,17 +357,6 @@ CREATE TABLE `prefix_survey_permissions` (
) ENGINE=$databasetabletype CHARACTER SET utf8 COLLATE utf8_unicode_ci;


--
-- Table structure for table survey_url_parameters
--
CREATE TABLE `prefix_survey_url_parameters` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`sid` int(11) NOT NULL,
`parameter` varchar(50) NOT NULL,
`targetqid` int(10) NULL,
`targetsqid` int(10) NULL,
PRIMARY KEY (`id`)
) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci;

--
-- Table structure for table user_groups
Expand Down
12 changes: 1 addition & 11 deletions admin/install/create-postgres.sql
Expand Up @@ -365,17 +365,7 @@ CREATE TABLE prefix_survey_permissions (
CONSTRAINT prefix_survey_permissions_pkey PRIMARY KEY (sid,uid,permission)
);

--
-- Table structure for table survey_url_parameters
--
CREATE TABLE prefix_survey_url_parameters (
id serial PRIMARY KEY NOT NULL,
sid integer NOT NULL,
parameter character varying(50) NOT NULL,
targetqid integer NULL,
targetsqid integer NULL
);


--
-- Table structure for table user_groups
--
Expand Down
2 changes: 1 addition & 1 deletion admin/integritycheck.php
Expand Up @@ -44,7 +44,7 @@
while ($aRow=$aResult->FetchRow())
{
$tablename=substr($aRow[0],strlen($dbprefix));
if ($tablename=='survey_permissions' || $tablename=='survey_links' || $tablename=='survey_url_parameters') continue;
if ($tablename=='survey_permissions' || $tablename=='survey_links') continue;
$iSurveyID=substr($tablename,strpos($tablename,'_')+1);
$qquery="SELECT sid FROM {$dbprefix}surveys WHERE sid='{$iSurveyID}'";
$qresult=$connect->Execute($qquery) or safe_die ("Couldn't check questions table for qids<br />$qquery<br />".$connect->ErrorMsg());
Expand Down
13 changes: 0 additions & 13 deletions admin/update/upgrade-mssql.php
Expand Up @@ -544,19 +544,6 @@ function db_upgrade($oldversion) {
modify_database("", "UPDATE [prefix_settings_global] SET stg_value='148' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();ob_flush();
}

if ($oldversion < 149)
{
modify_database("","CREATE TABLE [prefix_survey_url_parameters] (
[id] integer NOT NULL IDENTITY (1,1),
[sid] integer NOT NULL,
[parameter] varchar(50) NOT NULL,
[targetqid] integer NULL,
[targetsqid] integer NULL,
PRIMARY KEY ([id])
);"); echo $modifyoutput; flush();@ob_flush();
modify_database("","update [prefix_settings_global] set [stg_value]='149' where stg_name='DBVersion'"); echo $modifyoutput; flush();@ob_flush();

}
if ($oldversion < 150)
{
modify_database("","ALTER TABLE [prefix_questions] ADD [relevance] varchar(max);"); echo $modifyoutput; flush();@ob_flush();
Expand Down
12 changes: 0 additions & 12 deletions admin/update/upgrade-mssqlnative.php
Expand Up @@ -544,19 +544,7 @@ function db_upgrade($oldversion) {
fixSubquestions();
modify_database("", "UPDATE [prefix_settings_global] SET stg_value='148' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();ob_flush();
}
if ($oldversion < 149)
{
modify_database("","CREATE TABLE [prefix_survey_url_parameters] (
[id] integer NOT NULL IDENTITY (1,1),
[sid] integer NOT NULL,
[parameter] varchar(50) NOT NULL,
[targetqid] integer NULL,
[targetsqid] integer NULL,
PRIMARY KEY ([id])
);"); echo $modifyoutput; flush();@ob_flush();
modify_database("","update [prefix_settings_global] set [stg_value]='149' where stg_name='DBVersion'"); echo $modifyoutput; flush();@ob_flush();

}
if ($oldversion < 150)
{
modify_database("","ALTER TABLE [prefix_questions] ADD [relevance] varchar(max);"); echo $modifyoutput; flush();@ob_flush();
Expand Down
12 changes: 0 additions & 12 deletions admin/update/upgrade-mysql.php
Expand Up @@ -651,19 +651,7 @@ function db_upgrade($oldversion) {
fixSubquestions();
modify_database("", "UPDATE `prefix_settings_global` SET `stg_value`='148' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();@ob_flush();
}
if ($oldversion < 149)
{
modify_database("","CREATE TABLE `prefix_survey_url_parameters` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`sid` int(10) NOT NULL,
`parameter` varchar(50) NOT NULL,
`targetqid` int(10) NULL,
`targetsqid` int(10) NULL,
PRIMARY KEY (`id`)
) ENGINE=MYISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci;"); echo $modifyoutput; flush();@ob_flush();
modify_database("","update `prefix_settings_global` set `stg_value`='149' where stg_name='DBVersion'"); echo $modifyoutput; flush();@ob_flush();

}
if ($oldversion < 150)
{
modify_database("","ALTER TABLE `prefix_questions` ADD `relevance` TEXT;"); echo $modifyoutput; flush();@ob_flush();
Expand Down
12 changes: 0 additions & 12 deletions admin/update/upgrade-postgres.php
Expand Up @@ -373,18 +373,6 @@ function db_upgrade($oldversion) {

}

if ($oldversion < 149)
{
modify_database("","CREATE TABLE prefix_survey_url_parameters (
id serial PRIMARY KEY NOT NULL,
sid integer NOT NULL,
parameter character varying(50) NOT NULL,
targetqid integer NULL,
targetsqid integer NULL
);"); echo $modifyoutput; flush();@ob_flush();
modify_database("", "UPDATE prefix_settings_global SET stg_value='149' WHERE stg_name='DBVersion'"); echo $modifyoutput; flush();ob_flush();

}
if ($oldversion < 150)
{
modify_database("","ALTER TABLE prefix_questions ADD relevance TEXT;"); echo $modifyoutput; flush();@ob_flush();
Expand Down

0 comments on commit 3ee4e4f

Please sign in to comment.