MT#4685 Don't tie firmware to profile.

That way, you can upload multiple firmwares, and ngcp-panel
will serve the next or latest one, depending on the currently
running one.
3.1
Andreas Granig 12 years ago
parent 2f4b037ede
commit 7b86c0f786

@ -40,13 +40,6 @@ __PACKAGE__->belongs_to(
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
__PACKAGE__->has_many(
"autoprov_profiles",
"NGCP::Schema::Result::autoprov_profiles",
{ "foreign.firmware_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
sub TO_JSON {
my ($self) = @_;
return {

@ -16,13 +16,6 @@ __PACKAGE__->add_columns(
is_auto_increment => 1,
is_nullable => 0,
},
"firmware_id",
{
data_type => "integer",
extra => { unsigned => 1 },
is_foreign_key => 1,
is_nullable => 1,
},
"config_id",
{
data_type => "integer",
@ -43,18 +36,6 @@ __PACKAGE__->belongs_to(
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
);
__PACKAGE__->belongs_to(
"firmware",
"NGCP::Schema::Result::autoprov_firmwares",
{ id => "firmware_id" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
},
);
sub TO_JSON {
my ($self) = @_;
return {

Loading…
Cancel
Save