Missing data for column "gid" after structural changes

XMLWordPrintable

    • Type: Bug
    • Resolution: Invalid
    • Priority: High
    • None
    • Affects Version/s: None
    • Component/s: Database setup
    • None

      Hi,

      Three days ago, you released some structural database changes, for example, this one:
      https://github.com/metabrainz/musicbrainz-server/blob/master/admin/sql/CreateTables.sql

      Since then, the DB loads have been failing due to a missing column.

      psql:/tmp/temp_file_1_12_edcEN4oWzt:27: ERROR:  missing data for column "gid"
      CONTEXT:  COPY medium, line 1: "288902	288902	1	1		0	2011-05-16 14:57:06.530063+00	9"
      

      Here you can see the updated table structure:

      CREATE TABLE medium ( -- replicate (verbose)
          id                  SERIAL,
          release             INTEGER NOT NULL, -- references release.id
          position            INTEGER NOT NULL,
          format              INTEGER, -- references medium_format.id
          name                VARCHAR NOT NULL DEFAULT '',
          edits_pending       INTEGER NOT NULL DEFAULT 0 CHECK (edits_pending >= 0),
          last_updated        TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
          track_count         INTEGER NOT NULL DEFAULT 0,
          gid                 UUID NOT NULL
      );
      

      Here you can see the old and new datasets:

      Old dataset:
      288902	288902	1	1		0	2011-05-16 14:57:06.530063+00	9
      600623	600623	1	1		0	2011-05-16 14:57:06.530063+00	9
      600626	600626	1	1		0	2011-05-16 14:57:06.530063+00	9
      600627	600627	1	6		0	2011-05-16 14:57:06.530063+00	9
      7716	7716	1	1		0	2011-05-16 14:57:06.530063+00	9
      23301	23301	1	1		0	2011-05-16 14:57:06.530063+00	12
      63822	63822	1	1		0	2011-05-16 14:57:06.530063+00	12
      225710	225710	1	\N		0	2011-05-16 14:57:06.530063+00	10
      252429	252429	1	1		0	2011-05-16 14:57:06.530063+00	10
      384122	384122	1	31		0	2011-05-16 14:57:06.530063+00	4
      
      New dataset:
      288902	288902	1	1		0	2011-05-16 14:57:06.530063+00	9
      600623	600623	1	1		0	2011-05-16 14:57:06.530063+00	9
      600626	600626	1	1		0	2011-05-16 14:57:06.530063+00	9
      600627	600627	1	6		0	2011-05-16 14:57:06.530063+00	9
      7716	7716	1	1		0	2011-05-16 14:57:06.530063+00	9
      23301	23301	1	1		0	2011-05-16 14:57:06.530063+00	12
      63822	63822	1	1		0	2011-05-16 14:57:06.530063+00	12
      225710	225710	1	\N		0	2011-05-16 14:57:06.530063+00	10
      252429	252429	1	1		0	2011-05-16 14:57:06.530063+00	10
      384122	384122	1	31		0	2011-05-16 14:57:06.530063+00	4
      

      As you may have noticed, the gid data is missing from the new dataset.

      Could you please create a new DB dump with the appropriate datasets?

      Thanks,
      Attila

            Assignee:
            yvanzo
            Reporter:
            Attila Horváth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package