[Dbix-class] On the fly schema definition?

Matt S Trout dbix-class at trout.me.uk
Tue May 8 20:33:32 GMT 2007


On Tue, Mar 27, 2007 at 05:47:25PM -0400, Jim Spath wrote:
> My application will have some tables that include the date in the name, 
> and only exist for a period of a few days, after which time they will be 
> dropped.
> 
> eg: unique_user_view_20070327
> 
> The tables will be VERY simple in that they will have one primary key 
> column called "user_key".

You could re-create result source objects for these and just have a single
common class for them.
 
> How can I define the schema for these tables on the fly as needed?  I 
> obviously don't want to create physical schema files for them.
> 
> Secondarily, can I do the table creates and drops using DBIx::Class? 
> These would only need to happen once a day.

Maybe worth an experiment with the upgrade stuff once 08 is out.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Dbix-class mailing list