Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2) Update the new database in CSPM.

Before you start, make sure you have the latest matlab CSPM files, and a recent version of MySQL (preferably 5.6+) and MySQL Workbench (preferably 6.1+). Copy the new files to ...\matlab\spm12b, making sure you get the ...\matlab\spm12b\toolbox\CSPM files.

Create a new database

Save the existing MySQL database to a file (see save page). The SPM8 schema is usually called "sidata." Restore this file into a new database (schema), which you could call "sidata14" (see restore page). For good practice, you may also want to create a MySQL user (say "datauser") and give that user permissions to use the new database (see user permissions page). You will also need the old MySQL database name, user, and password.

Terminology note: what we call "database" is what MySQL calls "Schema."

Update the new database in CSPM

Make sure you have the the old SPM8 MySQL database name, user, and password.

Start SPM12, CSPM.

Go to local settings (CSPM "options" menu); enter the MySQL Database parameters for the newdatabase (sidata14, not the old sidata from SPM8). Click "Test" to check the connection. This has to work before the next step can run.

Image Added

Now run the upgrade script, under CSPM, Utilities (only do this once!). (It should cause an error if you run it a second time by mistake.)

Image Added

Bug in MATLAB

As of R2015a, there is a bug in the MATLAB database code which prevents renaming a table, a required step for the database upgrade. When you run the conversion (above), you may get an error, with two Explorer windows open. Copy the file "cursor.m" from the temp folder to the "@cursor" folder. (This file has the bug fixed.) Then type

 >> clear functions

to force MATLAB to load the corrected file, and re-run the conversion.