View Issue Details

IDProjectCategoryView StatusLast Update
0003821mantisbtsqlpublic2004-07-08 07:39
Reporterrainmkr Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Versiongit trunk 
Fixed in Version0.19.0a1 
Summary0003821: create statements syntax incorrect
Description

create statements when performing an upgrade does not work, quoting is incorrect.

TagsNo tags attached.
Attached Files
sponsor_fix.patch (2,236 bytes)   
Index: 0_18_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/admin/upgrades/0_18_inc.php,v
retrieving revision 1.5
diff -u -r1.5 0_18_inc.php
--- 0_18_inc.php	9 May 2004 02:24:17 -0000	1.5
+++ 0_18_inc.php	10 May 2004 12:53:07 -0000
@@ -163,30 +163,30 @@
 	$upgrades[] = new SQLUpgrade( 
 			'sponsorship-1',
 			'Add sponsorships table',
-			"CREATE TABLE 'mantis_sponsorship_table' (
-				'id' int(7) NOT NULL auto_increment,
-				'bug_id' int(7) NOT NULL default '0',
-				'user_id' int(7) NOT NULL default '0',
-				'amount' int(7) NOT NULL default '0',
-				'logo' varchar(128) NOT NULL default '',
-				'url' varchar(128) NOT NULL default '',
-				'paid' int(1) NOT NULL default '0',
-				'date_submitted' datetime NOT NULL default '1970-01-01 00:00:01',
-				'last_updated' datetime NOT NULL default '1970-01-01 00:00:01',
-				PRIMARY KEY  ('id'),
-				KEY 'bug_id' ('bug_id'),
-				KEY 'user_id' ('user_id')
+			"CREATE TABLE mantis_sponsorship_table (
+				id int(7) NOT NULL auto_increment,
+				bug_id int(7) NOT NULL default '0',
+				user_id int(7) NOT NULL default '0',
+				amount int(7) NOT NULL default '0',
+				logo varchar(128) NOT NULL default '',
+				url varchar(128) NOT NULL default '',
+				paid int(1) NOT NULL default '0',
+				date_submitted datetime NOT NULL default '1970-01-01 00:00:01',
+				last_updated datetime NOT NULL default '1970-01-01 00:00:01',
+				PRIMARY KEY  (id),
+				KEY bug_id (bug_id),
+				KEY user_id (user_id)
 				) TYPE=MyISAM COMMENT='A table for sponsorships' AUTO_INCREMENT=1" );
 
 	$upgrades[] = new SQLUpgrade( 
 			'sponsorship-2',
 			'Add sponsorship_total to bug table',
-			"ALTER TABLE 'mantis_bug_table' ADD 'sponsorship_total' INT( 7 ) DEFAULT '0' NOT NULL" );
+			"ALTER TABLE mantis_bug_table ADD sponsorship_total INT( 7 ) DEFAULT '0' NOT NULL" );
 
 	$upgrades[] = new SQLUpgrade( 
 			'sponsorship-3',
 			'Add an index on sponsorship_total in bug table',
-			"ALTER TABLE 'mantis_bug_table' ADD INDEX 'sponsorship_total' ( 'sponsorship_total' )" );
+			"ALTER TABLE mantis_bug_table ADD INDEX sponsorship_total ( sponsorship_total )" );
 
 	return $upgrades;
-?>
\ No newline at end of file
+?>
sponsor_fix.patch (2,236 bytes)   

Activities

vboctor

vboctor

2004-05-10 09:45

manager   ~0005485

Fixed in CVS. Thanks for the patch.