Remove build table and rs.

master
Kaitlyn Parkhurst 3 years ago
parent 20ee510809
commit 4fcd5a20fb
  1. 9
      DB/etc/schema.sql
  2. 19
      DB/lib/MJB/DB/Result/Blog.pm
  3. 121
      DB/lib/MJB/DB/Result/Build.pm

@ -105,15 +105,6 @@ CREATE TABLE repo (
created_at timestamptz not null default current_timestamp created_at timestamptz not null default current_timestamp
); );
--
-- TODO: Remove this after everything is updated for the jobs table
CREATE TABLE build (
id serial PRIMARY KEY,
blog_id int not null references blog(id),
job_id int not null, -- For minion->job($id)
created_at timestamptz not null default current_timestamp
);
-- For jobs that should show up on the web interface in Blog Manager -> Jobs. -- For jobs that should show up on the web interface in Blog Manager -> Jobs.
CREATE TABLE job ( CREATE TABLE job (
id serial PRIMARY KEY, id serial PRIMARY KEY,

@ -162,21 +162,6 @@ __PACKAGE__->set_primary_key("id");
=head1 RELATIONS =head1 RELATIONS
=head2 builds
Type: has_many
Related object: L<MJB::DB::Result::Build>
=cut
__PACKAGE__->has_many(
"builds",
"MJB::DB::Result::Build",
{ "foreign.blog_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 domain =head2 domain
Type: belongs_to Type: belongs_to
@ -243,8 +228,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-09 14:53:07 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-11 23:06:57
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pO7hPHfNDn6x5GP7apAUTg # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VQHf6EwwxUUAGeyMVk6KAw
use DateTime; use DateTime;

@ -1,121 +0,0 @@
use utf8;
package MJB::DB::Result::Build;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
MJB::DB::Result::Build
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 COMPONENTS LOADED
=over 4
=item * L<DBIx::Class::InflateColumn::DateTime>
=item * L<DBIx::Class::InflateColumn::Serializer>
=back
=cut
__PACKAGE__->load_components("InflateColumn::DateTime", "InflateColumn::Serializer");
=head1 TABLE: C<build>
=cut
__PACKAGE__->table("build");
=head1 ACCESSORS
=head2 id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
sequence: 'build_id_seq'
=head2 blog_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 job_id
data_type: 'integer'
is_nullable: 0
=head2 created_at
data_type: 'timestamp with time zone'
default_value: current_timestamp
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"id",
{
data_type => "integer",
is_auto_increment => 1,
is_nullable => 0,
sequence => "build_id_seq",
},
"blog_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"job_id",
{ data_type => "integer", is_nullable => 0 },
"created_at",
{
data_type => "timestamp with time zone",
default_value => \"current_timestamp",
is_nullable => 0,
},
);
=head1 PRIMARY KEY
=over 4
=item * L</id>
=back
=cut
__PACKAGE__->set_primary_key("id");
=head1 RELATIONS
=head2 blog
Type: belongs_to
Related object: L<MJB::DB::Result::Blog>
=cut
__PACKAGE__->belongs_to(
"blog",
"MJB::DB::Result::Blog",
{ id => "blog_id" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-07 05:14:59
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Yfx2//Fg5KBBNXVnq6FMA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
Loading…
Cancel
Save