Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-12237

Check constraint violation at the initial setup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      During the initial setup of the MusicBrainz DB, I loaded the dump (mbdump and mbdump-derived) data into the tables and then I tried to create the necessary objects but some of the check constraints failed.

       

      ALTER TABLE release
        ADD CONSTRAINT control_for_whitespace CHECK (controlled_for_whitespace(name)),
        ADD CONSTRAINT only_non_empty CHECK (name != '');
       --SQL Error [23514]: ERROR: check constraint "control_for_whitespace" of relation "release" is violated by some row

      ALTER TABLE release_group
        ADD CONSTRAINT control_for_whitespace CHECK (controlled_for_whitespace(name)),
        ADD CONSTRAINT only_non_empty CHECK (name != '');
       --SQL Error [23514]: ERROR: check constraint "control_for_whitespace" of relation "release_group" is violated by some row

      ALTER TABLE track
        ADD CONSTRAINT control_for_whitespace CHECK (controlled_for_whitespace(name)),
        ADD CONSTRAINT only_non_empty CHECK (name != '');
       --SQL Error [23514]: ERROR: check constraint "control_for_whitespace" of relation "track" is violated by some row

      ALTER TABLE recording
        ADD CONSTRAINT control_for_whitespace CHECK (controlled_for_whitespace(name)),
        ADD CONSTRAINT only_non_empty CHECK (name != '');
       --SQL Error [23514]: ERROR: check constraint "control_for_whitespace" of relation "recording" is violated by some row

      ALTER TABLE work
        ADD CONSTRAINT control_for_whitespace CHECK (controlled_for_whitespace(name)),
        ADD CONSTRAINT only_non_empty CHECK (name != '');
       --SQL Error [23514]: ERROR: check constraint "control_for_whitespace" of relation "work" is violated by some row

       

      How should I move forward?

            reosarevok Nicolás Tamargo
            nohattila Attila Horváth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package