Tricks and tips Administering DrawMGT

How to regenerate all thumbnails

Assumed all thumbnails should be regenerated:

$ cd pub/thumbnails
$ rm *
mysql -uroot -psqladmin {database}
mysql> update Revisions set sourceThumbnail = null, publishThumbnail = null, file3Thumbnail = null, file4Thumbnail = null, file5Thumbnail = null, file6Thumbnail = null;
mysql> update Events set stateId = 3, attemptNo = null, runDatetime = null where objectTypeId = 2 and eventTypeId = 24;

After the database changes the Event Daemon will regenerate the thumbnail files.

How to recreate database triggers after database changes

If it is necessary to recreate database triggers after database changes must be ensured that the triggers will have the same character set settings as the database. Otherwise unpredictable behavior can occur (every time a trigger is called, than 'show variables like "character_set_results";' reports changed character set). The achieve this , don't forget to use the "set names ..." command. Assumed the database is hcmc2140test and the character set is utf8:

$ cd {project root}
$ mysql -uroot -psqladmin hcmc2140test
mysql> set names utf8;
mysql> source var/hcmc2/zg.softxs.ch-test/schema/drawmgt-versioning-schema.sql
mysql> source var/hcmc2/zg.softxs.ch-test/schema/drawmgt-versioning-trigger.sql

Trigger character set can be checked with the command:

mysql> select EVENT_OBJECT_TABLE, TRIGGER_NAME, CHARACTER_SET_CLIENT, COLLATION_CONNECTION, DATABASE_COLLATION from information_schema.TRIGGERS where EVENT_OBJECT_SCHEMA = 'hcmc2140prod' [ and TRIGGER_NAME = 'upd_Users' ];

Database character set can be checked with the command:

mysql> select SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME from information_schema.SCHEMATA [ where SCHEMA_NAME = 'hcmc2140test' ];
Copyright 2008-2014, SoftXS GmbH, Switzerland