[postmodern-devel] Table extra options in DAO definition
Rafał Strzaliński
nablaone at gmail.com
Fri Jun 13 18:26:22 UTC 2008
2008/6/13 Marijn Haverbeke <marijnh at gmail.com>:
> Hi Rafal,
>
> Thanks for the patch. I don't have time to look at it right now but
> I'll get back to you in a week or so. Chances are, though, that I
> won't be including it as is.
That's not a problem. I'm using PM on my pet-project, so I can wait for
a "blessed" solution.
> Did you ever use Postmodern before
> version 1.10? The deftable form I had was going in this same
> direction, but it became a mess, so I decided to separate the 'class
> definition' part form the 'table definition' part. A feature similar
> to your patch that I have been thinking about including is to add
> something specifically for adding extra indices, sequences, and
> constraints to a table -- I'm already using something like it in all
> my major postmodern-using projects. Note that most extra aspects of
> tables can be added with extra statements *after* the 'create table'
> command has been given, and thus can be completely separate from the
> dao-table-definition functionality.
I would be fine if these extra aspects can be easy enabled/disabled. Droping
constraints (FKs, checks, and so on) is a very common while database
migration.
BTW Have You ever thinking supporting a db migration, from one schema
version to
another one? Something similar to Rails.
Basiclly, I'm not a big fan on keeping all SQL-stuff into an
application code. I like
'create.sql'/'drop.sql' kind of scripts. I'm thinking about PM port of
http://www.cliki.net/clsql-pg-introspect.
Maybe You already have something like that and could share :-)
--
Best regards,
Rafal Strzalinski (nabla)
http://nablaone.net
More information about the postmodern-devel
mailing list