CREATE TABLE IF NOT EXISTS artists (
  id   INTEGER PRIMARY KEY,
  name TEXT NOT NULL UNIQUE,
  mbid TEXT
);

CREATE INDEX IF NOT EXISTS idx_artists_mbid ON artists(mbid) WHERE mbid IS NOT NULL;
