Use latest DBIx::Class::Schema::Loader
This commit is contained in:
parent
c18fb0ad74
commit
9afaf322b3
|
@ -401,6 +401,21 @@ __PACKAGE__->has_many(
|
|||
undef,
|
||||
);
|
||||
|
||||
=head2 buildsteps_propagatedfroms
|
||||
|
||||
Type: has_many
|
||||
|
||||
Related object: L<Hydra::Schema::BuildSteps>
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"buildsteps_propagatedfroms",
|
||||
"Hydra::Schema::BuildSteps",
|
||||
{ "foreign.propagatedfrom" => "self.id" },
|
||||
undef,
|
||||
);
|
||||
|
||||
=head2 job
|
||||
|
||||
Type: belongs_to
|
||||
|
@ -509,19 +524,19 @@ __PACKAGE__->many_to_many(
|
|||
|
||||
Type: many_to_many
|
||||
|
||||
Composing rels: L</aggregateconstituents_constituents> -> constituent
|
||||
Composing rels: L</aggregateconstituents_aggregates> -> constituent
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->many_to_many(
|
||||
"constituents",
|
||||
"aggregateconstituents_constituents",
|
||||
"aggregateconstituents_aggregates",
|
||||
"constituent",
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-09-30 15:38:03
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kMPje7yi/yDqxGRQcC2I/Q
|
||||
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-07-30 16:03:55
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EwxiaQpqbdzI9RvU0uUtLQ
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"dependents",
|
||||
|
|
75
src/lib/Hydra/Schema/SystemStatus.pm
Normal file
75
src/lib/Hydra/Schema/SystemStatus.pm
Normal file
|
@ -0,0 +1,75 @@
|
|||
use utf8;
|
||||
package Hydra::Schema::SystemStatus;
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader
|
||||
# DO NOT MODIFY THE FIRST PART OF THIS FILE
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Hydra::Schema::SystemStatus
|
||||
|
||||
=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<SystemStatus>
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->table("SystemStatus");
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 what
|
||||
|
||||
data_type: 'text'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 status
|
||||
|
||||
data_type: 'json'
|
||||
is_nullable: 0
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"what",
|
||||
{ data_type => "text", is_nullable => 0 },
|
||||
"status",
|
||||
{ data_type => "json", is_nullable => 0 },
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</what>
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->set_primary_key("what");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-07-30 16:01:22
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JCYi4+HwM22iucdFkhBjMg
|
||||
|
||||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||
1;
|
|
@ -4,8 +4,8 @@ nobase_dist_sql_DATA = \
|
|||
hydra.sql \
|
||||
hydra-sqlite.sql \
|
||||
test.sql \
|
||||
upgrade-*.sql
|
||||
|
||||
upgrade-*.sql \
|
||||
update-dbix.pl
|
||||
|
||||
hydra-postgresql.sql: hydra.sql
|
||||
cpp -P -E -traditional-cpp -DPOSTGRESQL hydra.sql > $@ || rm -f $@
|
||||
|
@ -16,4 +16,4 @@ hydra-sqlite.sql: hydra.sql
|
|||
update-dbix: hydra-sqlite.sql
|
||||
rm -f tmp.sqlite
|
||||
sqlite3 tmp.sqlite < hydra-sqlite.sql
|
||||
perl -I ../lib -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:../lib -e 'make_schema_at("Hydra::Schema", { naming => { ALL => "v5" }, relationships => 1, moniker_map => sub {return "$$_";}, components => [ "+Hydra::Component::ToJSON" ], }, ["dbi:SQLite:tmp.sqlite"])'
|
||||
perl -I ../lib -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:../lib update-dbix.pl
|
||||
|
|
8
src/sql/update-dbix.pl
Normal file
8
src/sql/update-dbix.pl
Normal file
|
@ -0,0 +1,8 @@
|
|||
make_schema_at("Hydra::Schema", {
|
||||
naming => { ALL => "v5" },
|
||||
relationships => 1,
|
||||
moniker_map => sub { return "$_"; },
|
||||
components => [ "+Hydra::Component::ToJSON" ],
|
||||
rel_name_map => { buildsteps_builds => "buildsteps" }
|
||||
}, ["dbi:SQLite:tmp.sqlite"]);
|
||||
|
Loading…
Reference in a new issue