Remove support for views

They're replaced by aggregates, which are declarative, faster, and
have a better interface.
This commit is contained in:
Eelco Dolstra
2014-04-23 23:21:06 +02:00
parent 5e0d10a392
commit affec8881d
11 changed files with 4 additions and 907 deletions

View File

@ -256,36 +256,6 @@ __PACKAGE__->has_many(
undef,
);
=head2 viewjobs
Type: has_many
Related object: L<Hydra::Schema::ViewJobs>
=cut
__PACKAGE__->has_many(
"viewjobs",
"Hydra::Schema::ViewJobs",
{ "foreign.project" => "self.name" },
undef,
);
=head2 views
Type: has_many
Related object: L<Hydra::Schema::Views>
=cut
__PACKAGE__->has_many(
"views",
"Hydra::Schema::Views",
{ "foreign.project" => "self.name" },
undef,
);
=head2 usernames
Type: many_to_many
@ -297,8 +267,8 @@ Composing rels: L</projectmembers> -> username
__PACKAGE__->many_to_many("usernames", "projectmembers", "username");
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-04-23 22:48:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l8eN9UAavdqnL7Sjv4rmFw
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-04-23 23:13:08
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fkd9ruEoVSBGIktmAj4u4g
my %hint = (
columns => [

View File

@ -1,157 +0,0 @@
use utf8;
package Hydra::Schema::ViewJobs;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Hydra::Schema::ViewJobs
=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<ViewJobs>
=cut
__PACKAGE__->table("ViewJobs");
=head1 ACCESSORS
=head2 project
data_type: 'text'
is_foreign_key: 1
is_nullable: 0
=head2 view_
data_type: 'text'
is_foreign_key: 1
is_nullable: 0
=head2 job
data_type: 'text'
is_nullable: 0
=head2 attrs
data_type: 'text'
is_nullable: 0
=head2 isprimary
data_type: 'integer'
default_value: 0
is_nullable: 0
=head2 description
data_type: 'text'
is_nullable: 1
=head2 jobset
data_type: 'text'
is_nullable: 0
=head2 autorelease
data_type: 'integer'
default_value: 0
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"project",
{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },
"view_",
{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },
"job",
{ data_type => "text", is_nullable => 0 },
"attrs",
{ data_type => "text", is_nullable => 0 },
"isprimary",
{ data_type => "integer", default_value => 0, is_nullable => 0 },
"description",
{ data_type => "text", is_nullable => 1 },
"jobset",
{ data_type => "text", is_nullable => 0 },
"autorelease",
{ data_type => "integer", default_value => 0, is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</project>
=item * L</view_>
=item * L</job>
=item * L</attrs>
=back
=cut
__PACKAGE__->set_primary_key("project", "view_", "job", "attrs");
=head1 RELATIONS
=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" },
);
=head2 view
Type: belongs_to
Related object: L<Hydra::Schema::Views>
=cut
__PACKAGE__->belongs_to(
"view",
"Hydra::Schema::Views",
{ name => "view_", project => "project" },
{ is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
);
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hz912vBfYw0rHslBPqJW2w
1;

View File

@ -1,123 +0,0 @@
use utf8;
package Hydra::Schema::Views;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Hydra::Schema::Views
=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<Views>
=cut
__PACKAGE__->table("Views");
=head1 ACCESSORS
=head2 project
data_type: 'text'
is_foreign_key: 1
is_nullable: 0
=head2 name
data_type: 'text'
is_nullable: 0
=head2 description
data_type: 'text'
is_nullable: 1
=head2 keep
data_type: 'integer'
default_value: 0
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"project",
{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },
"name",
{ data_type => "text", is_nullable => 0 },
"description",
{ data_type => "text", is_nullable => 1 },
"keep",
{ data_type => "integer", default_value => 0, is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</project>
=item * L</name>
=back
=cut
__PACKAGE__->set_primary_key("project", "name");
=head1 RELATIONS
=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" },
);
=head2 viewjobs
Type: has_many
Related object: L<Hydra::Schema::ViewJobs>
=cut
__PACKAGE__->has_many(
"viewjobs",
"Hydra::Schema::ViewJobs",
{ "foreign.project" => "self.project", "foreign.view_" => "self.name" },
undef,
);
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U23GZ3k5KZk2go6j2LYLHA
1;