Jobs.jobset_id: make not-null

[?]
Feb 6, 2020, 12:42 AM
5ZRYT2YEUWY655IVH6GQBHXZJTE756X2TUCKTREFPKVDMRDYQWPQC

Dependencies

  • [2] SIDK2E7V Jobs: add a nullable jobset_id foreign key to Jobsets.
  • [3] S5PV6IIM * Represent jobs explicitly in the DB.
  • [4] JM3DPYOM generated schema with new dbix class schema loader, grrrrrr
  • [5] SB2V735V Keep track of the database schema version
  • [6] 3PNG7NIB Remove trailing whitespace
  • [7] KSBB33RE Add a dashboard
  • [8] W5OAZWPD Drop the errorMsg column in the Jobs table
  • [9] T5BIOVJE Add support for tracking custom metrics
  • [10] KN3VYE5P * Cleaned up the foreign key constraints.
  • [11] IGR322YP sql: Generate models from postgresql
  • [*] N22GPKYT * Put info about logs / build products in the DB.
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • replacement in src/lib/Hydra/Schema/Jobs.pm at line 54
    [2.62][2.62:79]()
    is_nullable: 1
    [2.62]
    [3.13851]
    is_nullable: 0
  • replacement in src/lib/Hydra/Schema/Jobs.pm at line 69
    [2.95][2.95:164]()
    { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
    [2.95]
    [3.1774]
    { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
  • replacement in src/lib/Hydra/Schema/Jobs.pm at line 142
    [2.218][2.218:346]()
    {
    is_deferrable => 0,
    join_type => "LEFT",
    on_delete => "CASCADE",
    on_update => "NO ACTION",
    },
    [2.218]
    [2.346]
    { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
  • replacement in src/lib/Hydra/Schema/Jobs.pm at line 195
    [3.1556][2.500:642]()
    # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-06 12:30:58
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dFusVjxb423gIEoadAw9sw
    [3.1556]
    [3.2756]
    # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-06 12:33:28
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:C5Tyh8Ke4yC6q7KIFVOHcQ
  • replacement in src/sql/hydra.sql at line 149
    [3.6902][2.1285:1317]()
    jobset_id integer null,
    [3.6902]
    [3.6902]
    jobset_id integer not null,
  • file addition: upgrade-63.sql (----------)
    [14.3004]
    -- Make the Jobs.jobset_id column NOT NULL. If this upgrade fails,
    -- either the admin didn't run the backfiller or there is a bug. If
    -- the admin ran the backfiller and there are null columns, it is
    -- very important to figure out where the nullable columns came from.
    ALTER TABLE Jobs
    ALTER COLUMN jobset_id SET NOT NULL;