Cannot upload after OrientDB to H2 migration: Unique index or primary key violation #449
Cannot download anything new through pip proxy. Cannot add new objects.
Solution: https://github.com/sonatype/nexus-public/issues/449#issuecomment-2285844522
For docker-compose.yml
based installation:
services: nexus3: image: sonatype/nexus3:3.72.0 container_name: nexus3 command: "sleep 3600" volumes: - "nexus-data:/nexus-data"
/var/lib/docker/volumes/nexus3_nexus-data/_data
chown 200 migrator_script.sh
chmod +x migrator_script.sh
NEXUS_BIN=/opt/sonatype/nexus NEXUS_DATA=/nexus-data
docker compose up -d
docker compose exec nexus3 /bin/bash
cd /nexus-ddata
./migrator_repair.sh
CTRL+D
docker compose stop
docker-compose.yml
docker compose up -d
./migrator_repair.sh
script output
> SCRIPT NODATA > ALTER TABLE TAG ALTER COLUMN ID RESTART WITH SELECT max(ID) + 1 FROM TAG (Update count: 0, 13 ms) > ALTER TABLE RAW_CONTENT_REPOSITORY ALTER COLUMN REPOSITORY_ID RESTART WITH SELECT max(REPOSITORY_ID) + 1 FROM RAW_CONTENT_REPOSITORY (Update count: 0, 14 ms) ... > ALTER TABLE P2_BROWSE_NODE ALTER COLUMN NODE_ID RESTART WITH SELECT max(NODE_ID) + 1 FROM P2_BROWSE_NODE (Update count: 0, 13 ms)