Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

DBIx::Class unique constraint with limited key length

by chrestomanci (Priest)
on Aug 21, 2015 at 09:54 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-03-28 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found