BXHG3HYLCKXL35S2MCIBTXTP6UO55NASYE7XCLQP4PXPSVDMUIAQC
ZFEN2MAOJRRQEIORSK2N6PNAWGBEN2WNAWA6IWUVOHP5I5PQC6JAC
YI3BZG5NWMKBT7T2HEOHVHSZBQ5KPDWSI3VRYOMQ346LRFB4MR2AC
IRRNAEVLR2BOH46LC7IUM2US5VYO4UO7MPVOEZDZKHUOGS52QXTAC
TQVKZQUGCFYNH5P56LXMXRXZNTD56MH5T5GX2BMQ5YSRPGHAUYMAC
3HZY24CX4U2TO74HOY4YX3LBJIYF4DLXHCIY7J2RASAC4COMSMZAC
ODNCGFQ5FPKFI624BVMLW7PJ2EFJOR3TY66OCZM42UNNTWBCF2TQC
D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC
FYO6NECE4YJC76HQIG35NNJABODV7KNQKREK5YKZU6O2MNNSQTMAC
X27GNHDV5KPZ5GSH6DCAJMNCEMZLCP7M43JWF2X3O5QWXMOX273AC
SB2V735VJ2CDHGCXRUA5FOYHDRXQFVOZ3KXC3YKXWRNW6DIX7RXQC
KSBB33RE2PK5SFN7ZMOTZJQHZB4JYIIUUKWDSD3LSZ5GD465AJHQC
KN3VYE5P2RJB3KZ355LA5C2T2D5S2IR3QZFE53AJIWUVMETEEYDAC
JM3DPYOMVNMCL5GMEYC3Y4NDRGTNIFBBFTPGPVT66GPENVPU7EVQC
Y6AHH4THYQA43V77L43YM42DYRPCMDSWLUV4NKWAQYMPL4NTUIPQC
7ECJWNVXNO3BKM7B7FIFIRBE77QET5PK2C3XKVQUXCYKHDP3V4UQC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
notFound($c, "Jobset ‘$jobsetName’ doesn't exist.")
if !$c->stash->{jobset} && !($c->action->name eq "jobset" and $c->request->method eq "PUT");
if (!$c->stash->{jobset} && !($c->action->name eq "jobset" and $c->request->method eq "PUT")) {
my $rename = $project->jobsetrenames->find({ from_ => $jobsetName });
notFound($c, "Jobset ‘$jobsetName’ doesn't exist.") unless defined $rename;
$c->stash->{jobset} = $project->jobsets->find({ name => $rename->to_ }) or die;
}
use utf8;
package Hydra::Schema::JobsetRenames;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Hydra::Schema::JobsetRenames
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 COMPONENTS LOADED
=over 4
=item * L<Hydra::Component::ToJSON>
=back
=cut
__PACKAGE__->load_components("+Hydra::Component::ToJSON");
=head1 TABLE: C<JobsetRenames>
=cut
__PACKAGE__->table("JobsetRenames");
=head1 ACCESSORS
=head2 project
data_type: 'text'
is_foreign_key: 1
is_nullable: 0
=head2 from_
data_type: 'text'
is_nullable: 0
=head2 to_
data_type: 'text'
is_foreign_key: 1
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"project",
{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },
"from_",
{ data_type => "text", is_nullable => 0 },
"to_",
{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</project>
=item * L</from_>
=back
=cut
__PACKAGE__->set_primary_key("project", "from_");
=head1 RELATIONS
=head2 jobset
Type: belongs_to
Related object: L<Hydra::Schema::Jobsets>
=cut
__PACKAGE__->belongs_to(
"jobset",
"Hydra::Schema::Jobsets",
{ name => "to_", project => "project" },
{ is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
);
=head2 project
Type: belongs_to
Related object: L<Hydra::Schema::Projects>
=cut
__PACKAGE__->belongs_to(
"project",
"Hydra::Schema::Projects",
{ name => "project" },
{ is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
);
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-04-23 23:13:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SBpKWF9swFc9T1Uc0VFlgA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DTAGxP5RFvcNxP/ciJGo4Q
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-04-23 23:13:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CO0aE+jrjB+UrwGRzWZLlw
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PdNQ2mf5azBB6nI+iAm8fQ
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-04-23 22:48:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l8eN9UAavdqnL7Sjv4rmFw
);
create table JobsetRenames (
project text not null,
from_ text not null,
to_ text not null,
primary key (project, from_),
foreign key (project) references Projects(name) on delete cascade on update cascade,
foreign key (project, to_) references Jobsets(project, name) on delete cascade on update cascade
create table JobsetRenames (
project text not null,
from_ text not null,
to_ text not null,
primary key (project, from_),
foreign key (project) references Projects(name) on delete cascade on update cascade,
foreign key (project, to_) references Jobsets(project, name) on delete cascade on update cascade
);