View Issue Details

IDProjectCategoryView StatusLast Update
0020443mantisbtinstallationpublic2016-06-12 00:43
Reporterdregad Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.3.0-rc.1 
Target Version1.3.0-rc.2Fixed in Version1.3.0-rc.2 
Summary0020443: New 'api_token' table does not have standard options
Description

The schema change to implement 0017766 did not assign the standard table options to the CreateTableSQL statement


array(
'mysql' => 'ENGINE=MyISAM DEFAULT CHARSET=utf8',
'pgsql' => 'WITHOUT OIDS' )
)

This will most likely not be a problem for MySQL since the plan is to move away from the MyISAM engine, and the charset will be inherited from global database settings.

We need to fix this for PostgreSQL however.

Unfortunately, AFAIK the ADOdb data dictionary does not let us alter table options, so it's not possible to do this cleanly without dropping the table and recreating it. That implies

  • create new table with correct structure
  • migrate data from old table to new
  • drop old table
  • rename new table

Alternatively, as the presence of an OID field is unlikely to cause any significant issues in Mantis, we could go with a more simple approach of updating upgrade step 200 as appropriate.

Considering the market share of postgresql, I would be tempted to go with the 2nd approach.

Additional Information

Severity set to major because we should not release 1.3.0 with an inconsistent schema.

TagsNo tags attached.

Relationships

related to 0017766 closedvboctor Access Tokens instead of Passwords 
related to 0020472 closeddregad New 'api_token' table columns are not defined in standard way 

Activities

dregad

dregad

2015-12-29 06:05

developer   ~0052203

Reminder sent to: vboctor

Your feedback on this would be appreciated.

vboctor

vboctor

2015-12-29 10:52

manager   ~0052205

Let's update the existing step since Mantis won't care either way whether OIDS exist or not.

Do we have a wiki page for what we want schema changes to look like and why? If not, it would be useful to add it. We should also use it as a checklist for pull requests related to the db schema.

dregad

dregad

2016-01-01 19:25

developer   ~0052228

Pull request https://github.com/mantisbt/mantisbt/pull/699

dregad

dregad

2016-01-16 18:01

developer   ~0052323

In the end I merged this fix independently from PR 699, as its primary purpose is to support utf8mb4, which is not blocking for 1.3.0 release.

Related Changesets

MantisBT: master a21eb8c2

2015-12-29 08:12

dregad


Details Diff
Use default table options for api_token table

The schema change to implement 0017766 did not assign the standard table
options to the CreateTableSQL statement.

Fixes 0020443
Affected Issues
0020443
mod - admin/schema.php Diff File