Permalink
Browse files

Moar unique keys.

  • Loading branch information...
1 parent 430cf78 commit 407231d24aa07c71e0f145c00b9784cd970e9b9f @denny committed Feb 9, 2012
View
@@ -282,9 +282,9 @@ create table if not exists cms_page (
section int ,
menu_position int ,
- unique key cms_page_section_url_name ( section, url_name ),
- foreign key cms_page_template ( template ) references cms_template ( id ),
- foreign key cms_page_section ( section ) references cms_section ( id ),
+ unique key cms_page_url_name ( section, url_name ),
+ foreign key cms_page_template ( template ) references cms_template ( id ),
+ foreign key cms_page_section ( section ) references cms_section ( id ),
primary key ( id )
)
ENGINE=InnoDB;
@@ -495,6 +495,7 @@ create table if not exists forum_section (
description text ,
display_order int ,
+ unique key forum_section_url_name ( url_name ),
primary key ( id )
)
ENGINE=InnoDB;
@@ -509,6 +510,7 @@ create table if not exists forum (
description text ,
display_order int ,
+ unique key forum_url_name ( section, url_name ),
foreign key forum_section ( section ) references forum_section ( id ),
primary key ( id )
)
@@ -108,7 +108,7 @@ __PACKAGE__->set_primary_key("id");
=head1 UNIQUE CONSTRAINTS
-=head2 C<cms_page_section_url_name>
+=head2 C<cms_page_url_name>
=over 4
@@ -120,7 +120,7 @@ __PACKAGE__->set_primary_key("id");
=cut
-__PACKAGE__->add_unique_constraint("cms_page_section_url_name", ["section", "url_name"]);
+__PACKAGE__->add_unique_constraint("cms_page_url_name", ["section", "url_name"]);
=head1 RELATIONS
@@ -190,8 +190,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-09 00:25:26
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k2MX8Gy5v1aLOVfx2Y4fbw
+# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-09 00:40:58
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a15+RaG1eE6q2A+sNeRWFA
@@ -105,6 +105,22 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("id");
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<forum_url_name>
+
+=over 4
+
+=item * L</section>
+
+=item * L</url_name>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint("forum_url_name", ["section", "url_name"]);
+
=head1 RELATIONS
=head2 forum_posts
@@ -138,8 +154,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-11-19 02:30:00
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Bj9Qwz4F4ZL4Ez9CMLW/sQ
+# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-09 00:40:58
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lm3GH3971kZBfg4jAiM6Qw
=head2 post_count
@@ -97,6 +97,20 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("id");
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<forum_section_url_name>
+
+=over 4
+
+=item * L</url_name>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint("forum_section_url_name", ["url_name"]);
+
=head1 RELATIONS
=head2 forums
@@ -115,8 +129,8 @@ __PACKAGE__->has_many(
);
-# Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-11-19 02:30:00
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1pxZH4u0yKeIzsw49z8DDw
+# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-09 00:40:58
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4Wn1A/jSol6zbqLDQyD1kQ
=head2 sorted_forums

0 comments on commit 407231d

Please sign in to comment.