From 9b38b5f13455e7b0637dd8a3945328e2344e8ede Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 30 Sep 2014 15:43:32 +0200 Subject: [PATCH] Remove the longDescription field It's not useful and takes up a lot of space. --- src/c/hydra-eval-jobs.cc | 1 - src/lib/Hydra/Helper/AddBuilds.pm | 1 - src/lib/Hydra/Schema/Builds.pm | 11 ++--------- src/lib/Hydra/View/NixExprs.pm | 2 -- src/root/build.tt | 4 ---- src/script/hydra-eval-guile-jobs.in | 1 - src/sql/hydra.sql | 1 - src/sql/upgrade-31.sql | 1 + 8 files changed, 3 insertions(+), 19 deletions(-) create mode 100644 src/sql/upgrade-31.sql diff --git a/src/c/hydra-eval-jobs.cc b/src/c/hydra-eval-jobs.cc index 75a16847..ad5b2d7a 100644 --- a/src/c/hydra-eval-jobs.cc +++ b/src/c/hydra-eval-jobs.cc @@ -120,7 +120,6 @@ static void findJobsWrapped(EvalState & state, JSONObject & top, res.attr("system", drv.system); res.attr("drvPath", drvPath = drv.queryDrvPath()); res.attr("description", drv.queryMetaString("description")); - res.attr("longDescription", drv.queryMetaString("longDescription")); res.attr("license", queryMetaStrings(state, drv, "license")); res.attr("homepage", drv.queryMetaString("homepage")); res.attr("maintainers", queryMetaStrings(state, drv, "maintainers")); diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 646ddb42..f4a16ab6 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -531,7 +531,6 @@ sub checkBuild { $build = $job->builds->create( { timestamp => $time , description => $buildInfo->{description} - , longdescription => $buildInfo->{longDescription} , license => $buildInfo->{license} , homepage => $buildInfo->{homepage} , maintainers => $buildInfo->{maintainers} diff --git a/src/lib/Hydra/Schema/Builds.pm b/src/lib/Hydra/Schema/Builds.pm index 8f40917f..852c6c32 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -89,11 +89,6 @@ __PACKAGE__->table("Builds"); data_type: 'text' is_nullable: 0 -=head2 longdescription - - data_type: 'text' - is_nullable: 1 - =head2 license data_type: 'text' @@ -228,8 +223,6 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0 }, "system", { data_type => "text", is_nullable => 0 }, - "longdescription", - { data_type => "text", is_nullable => 1 }, "license", { data_type => "text", is_nullable => 1 }, "homepage", @@ -527,8 +520,8 @@ __PACKAGE__->many_to_many( ); -# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-08-15 00:20:01 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U1j/qm0vslb6Jvgu5mGMtw +# 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 __PACKAGE__->has_many( "dependents", diff --git a/src/lib/Hydra/View/NixExprs.pm b/src/lib/Hydra/View/NixExprs.pm index 25c06b2e..552a7c36 100644 --- a/src/lib/Hydra/View/NixExprs.pm +++ b/src/lib/Hydra/View/NixExprs.pm @@ -72,8 +72,6 @@ EOF $res .= " meta = {\n"; $res .= " description = ${\escape $build->description};\n" if $build->description; - $res .= " longDescription = ${\escape $build->longdescription};\n" - if $build->longdescription; $res .= " license = ${\escape $build->license};\n" if $build->license; $res .= " maintainers = ${\escape $build->maintainers};\n" diff --git a/src/root/build.tt b/src/root/build.tt index 9475fc68..4a5f4548 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -299,10 +299,6 @@ Short description: [% IF build.description %][% HTML.escape(build.description) %][% ELSE %]not given[% END %] - - Long description: - [% IF build.longdescription %][% HTML.escape(build.longdescription) %][% ELSE %]not given[% END %] - License: [% IF build.license %][% HTML.escape(build.license) %][% ELSE %]not given[% END %] diff --git a/src/script/hydra-eval-guile-jobs.in b/src/script/hydra-eval-guile-jobs.in index 369c3f8f..70550db7 100644 --- a/src/script/hydra-eval-guile-jobs.in +++ b/src/script/hydra-eval-guile-jobs.in @@ -120,7 +120,6 @@ symbol/thunk pairs." (string-join (map loop l))) (_ "")))) ,@(opt-attr 'description 'description) - ,@(opt-attr 'longDescription 'long-description) (maintainers ,(string-join (or (assoc-ref result 'maintainers) '()) diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index 58513832..15666623 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -142,7 +142,6 @@ create table Builds ( drvPath text not null, system text not null, - longDescription text, -- meta.longDescription license text, -- meta.license homepage text, -- meta.homepage maintainers text, -- meta.maintainers (concatenated, comma-separated) diff --git a/src/sql/upgrade-31.sql b/src/sql/upgrade-31.sql new file mode 100644 index 00000000..4f36fc68 --- /dev/null +++ b/src/sql/upgrade-31.sql @@ -0,0 +1 @@ +alter table Builds drop column longDescription;