Although I very much like the MTOS administration interface, it doesn’t do everything I need it to, so recently I’ve started to modify my database using Ruby scripts (I’ve been doing a lot of Ruby development lately).
It works well, but I do wish that some of the MTOS tables were InnoDB with cascading foreign key constraints, that would certainly make it easier to do some external scripting. For example, the mttemplate and mttemplatemeta tables should be related to one another. Awhile back I purged a bunch of duplicate templates from the mttemplate table, yet their meta data rows remained, until I ran this query today:
SELECT `mt_template_meta`.* FROM `mt_template_meta` LEFT JOIN `mt_template` ON `mt_template_meta`.`template_meta_template_id` = `mt_template`.`template_id` WHERE `mt_template`.`template_id` IS NULL
I’ve also been inputting entries using a shell script, and that seems to be working fine, though I don’t know how to trigger it other that to rebuild the blog on a daily basis using Bob the Rebuilder.
I do like the MTOS data model though. So much so that I’m planning to use it as the backend for Established Sites!
