[MKDoc-dev] Events Component: Milestone 1 Complete

Bruno Postle bruno at webarchitects.co.uk
Mon Oct 18 22:46:22 BST 2004


On Sun 17-Oct-2004 at 15:17 -0400, Sam Tregar wrote:
> 
> You'll need to rebuild your database, or else create the new
> Document_TimeRange table by hand.  I could create a script to do
> this, although a full-fledged database upgrade mechanism would be
> even better.

We generally assemble an sql script for this purpose, something like
this (untested):

  CREATE TABLE IF NOT EXISTS Document_TimeRange (
    ID int(11) NOT NULL auto_increment,
    Document_ID int(11) default NULL,
    FromDate datetime NOT NULL default '0000-00-00 00:00:00',
    ToDate datetime NOT NULL default '0000-00-00 00:00:00',
    PRIMARY KEY  (ID),
  ) TYPE=MyISAM;

> I'm still in favor of bringing in DateTime::TimeZone from CPAN to
> produce a better selection list for timezones.

This is fine, upgraders will just have to be made aware of the new
dependency.  Though I am concerned that the timezone list might get
too long - The full list of possible timezones offered when doing a
Linux installation is enormous.

I've been working off-site all day so I haven't had a chance to try
the patch, though I have some initial comments from browsing it:

- I'd like the list of months to be defined in the template somehow
  so it can be localised along with the rest of the user interface.
  Chris, is this possible with Petal?

- The 'minutes' field can be set to the nearest minute, is a select
  list of 60 items too long?  or should we reduce it to 5 minute
  intervals?

- The times as stored in the database are normalised to UTC - I
  assume this means that the 'canonical' data with timezone is
  stored as XML in the component?
  
  I wonder if the search indexer cronjob could manage updating the
  Document_TimeRange table - Not necessary right now, but we have
  had problems in the past when a form submission updates multiple
  MySQL tables - This is where the indexer script came from in the
  first place.

> PS: My first attempt to send this message bounced because it was
> bigger than 40kb.

I've upped it to 200kB, should be ok for now.

-- 
Bruno


More information about the MKDoc-dev mailing list