Userprofile

The user profile is an InterMine ObjectStore? which stores Profile information such as username and password, tags, queries, lists and templates.

Initialising the userprofile database

These commands are needed in the webapp to initialise a userprofile database:

cd <MINE_NAME>/webapp
ant build-db-userprofile

Loading default templates and tags

Default templates and tags are defined in <MINE_NAME>/webapp/srcdefault-template-queries.xml

To load them:

cd <MINE_NAME>/webapp
ant load-default-templates

Porting the userprofile

If a new version of the production database:

Saved lists contain internal ids of objects that change with each release. The userprofile database therefore needs to be ported to find the corresponding ids in the new database. You will need to create a new userprofile database with a different name.

  • make sure you have a dump of your old userprofile database just in case.
  • set properties to point at old userprofile and old database - in <MINE_NAME>/webapp run: ant write-userprofile-xml. This creates a file: build/userprofile.xml.
  • set properties to point at the new userprofile database.
  • make sure table osbag_int is empty in the new production database.
  • in <MINE_NAME>/webapp run ant create-db-userprofile for new database - this creates the tables but does not add the superuser account
  • read in the userprofile database - in <MINE_NAME>/webapp run: ant read-userprofile-xml
  • check numbers in savedbag, savedtemplatequery, savedquery and tag (note that any empty bags will disappear)

If existing version of production database:

  • dump production userprofile database and load into new userprofile
  • dump production osbag_int table and load into new production database
  • import templates and tags from the preview (if they have been changed)