Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

DBIx::Class unique constraint with limited key length

by chrestomanci (Priest)
on Aug 21, 2015 at 09:54 UTC ( #1139402=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    __PACKAGE__->table("classification_rules");
    __PACKAGE__->add_columns(
    ...
    
    __PACKAGE__->set_primary_key("id");
    __PACKAGE__->add_unique_constraint( ['path'] );
    
  2. or download this
    CREATE TABLE `classification_rules` (
      `id` integer NOT NULL auto_increment,
    ...
      PRIMARY KEY (`id`),
      UNIQUE `classification_rules_path` (`path`)
    ) ENGINE=InnoDB;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1139402]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2020-01-23 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?