Daniel McBrearty wrote:
> thanks.
>
> so presumably if you have constraints that are a bit more complex than
> unique/PK, you code these somehow into your model classes, and never
> really touch the sql itself?
>
> (we currently have stuff like :
>
> CREATE TABLE languages(
> id SERIAL PRIMARY KEY,
> language_code TEXT UNIQUE,
> is_original BOOLEAN NOT NULL DEFAULT FALSE
> );
>
> -- there can only be ONE base language
> CREATE UNIQUE index languages_only_one_true_base_idx
> ON languages (is_original)
> WHERE is_original;
>
> in db.sql - I guess I'd have to overload the accessor or something with DBIx?
add_unique_constraint
Which are handled by deploy as of 06999.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/