Skip to content

ATC database migration SQL script mistakenly assumes "public" schema #2120

Closed

Description

@vganoradg

Bug Report

I found a problem in the ATC database migration SQL scripts. Line 8 of 1517330648_add_worker_resource_certs.up.sql assumes that the "workers" table is in the "public" schema. (See https://github.com/concourse/atc/blob/1d8e64412cf894801be7c655a95bdfe01e1e86a8/db/migration/migrations/1517330648_add_worker_resource_certs.up.sql#L8 ) Nothing else make that assumption and we've always used a different schema name. I believe line 8 should instead be as follows:

  CONSTRAINT "worker_resource_certs_worker_name_fkey" FOREIGN KEY ("worker_name") REFERENCES "workers"("name") ON DELETE CASCADE ON UPDATE SET NULL

Activity

  1. vito commented on Mar 28, 2018

    @vito
    Contributor

    Good catch! We should definitely fix that.

    A PR would be very much appreciated, fwiw.

  2. vito commented on Apr 2, 2018

    @vito
    Contributor

    thanks for submitting the PR!

  3. modified the milestone: v3.11.0 on Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions