From b4a31e78c8dbc8a6603402ffeb34e56d898f5a3d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 9 Jan 2017 15:11:52 -0800 Subject: [PATCH] update schema to 4 with more constraints --- Debbugs/DB.pm | 2 +- Debbugs/DB/Result/BinAssociation.pm | 20 ++++++++++++++++++-- Debbugs/DB/Result/BinVer.pm | 18 ++---------------- Debbugs/DB/Result/SrcAssociation.pm | 20 ++++++++++++++++++-- Debbugs/DB/Result/Suite.pm | 16 ++++++++++++++-- 5 files changed, 53 insertions(+), 23 deletions(-) diff --git a/Debbugs/DB.pm b/Debbugs/DB.pm index c393744..ed6c46a 100644 --- a/Debbugs/DB.pm +++ b/Debbugs/DB.pm @@ -17,7 +17,7 @@ __PACKAGE__->load_namespaces; # This version must be incremented any time the schema changes so that # DBIx::Class::DeploymentHandler can do its work -our $VERSION=3; +our $VERSION=4; # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Debbugs/DB/Result/BinAssociation.pm b/Debbugs/DB/Result/BinAssociation.pm index 02d923e..7ae23fa 100644 --- a/Debbugs/DB/Result/BinAssociation.pm +++ b/Debbugs/DB/Result/BinAssociation.pm @@ -122,6 +122,22 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("id"); +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("bin_associations_bin_suite", ["bin", "suite"]); + =head1 RELATIONS =head2 bin @@ -155,8 +171,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T7Jms1yHoqpzOdL4mnmBOA +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-11-24 09:00:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3F77iWjlJrHs/98TOfroAA # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Debbugs/DB/Result/BinVer.pm b/Debbugs/DB/Result/BinVer.pm index 7a71c09..df90ebf 100644 --- a/Debbugs/DB/Result/BinVer.pm +++ b/Debbugs/DB/Result/BinVer.pm @@ -127,20 +127,6 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->add_unique_constraint("bin_ver_bin_pkg_id_arch_idx", ["bin_pkg", "arch", "ver"]); -=head2 C - -=over 4 - -=item * L - -=item * L - -=back - -=cut - -__PACKAGE__->add_unique_constraint("bin_ver_src_ver_id_arch_idx", ["src_ver", "arch"]); - =head1 RELATIONS =head2 arch @@ -204,8 +190,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Jie49PiJahtnqmfkKQYtcw +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-11-24 09:08:27 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DzTzZbPkilT8WMhXoZv9xw # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Debbugs/DB/Result/SrcAssociation.pm b/Debbugs/DB/Result/SrcAssociation.pm index f35eb16..01ac4bd 100644 --- a/Debbugs/DB/Result/SrcAssociation.pm +++ b/Debbugs/DB/Result/SrcAssociation.pm @@ -122,6 +122,22 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("id"); +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("src_associations_source_suite", ["source", "suite"]); + =head1 RELATIONS =head2 source @@ -155,8 +171,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OArdotyolRaEbHj7Yxio2Q +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-11-24 08:52:49 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B3gOeYD0JxOUtV92mBocZQ # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Debbugs/DB/Result/Suite.pm b/Debbugs/DB/Result/Suite.pm index cf1d04a..37c875c 100644 --- a/Debbugs/DB/Result/Suite.pm +++ b/Debbugs/DB/Result/Suite.pm @@ -121,6 +121,18 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->add_unique_constraint("suite_idx_codename", ["codename"]); +=head2 C + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("suite_idx_version", ["version"]); + =head2 C =over 4 @@ -181,8 +193,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-11-23 18:13:51 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:32GH2trGMuarLv+EjO1l8w +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-11-24 08:52:49 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nXoQCYZhM9cFgC1x+RY9rA # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.39.2