cockroachdb / cockroachdb/cockroach

Gitea install failure

Open
#131,306 5 comments 0 reactions 0 assignees View on GitHub
branch-master C-enhancement O-community T-sql-foundations X-blathers-triaged
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

Gitea install fails when configuring CockroachDB as PostgreSQL database source

**To Reproduce**

Initiate a Gitea install, providing a CockroachDB as PG db source.

**Expected behavior**
Gitea installs without error.

**Additional data / screenshots**

Install log says:
`The database settings are invalid: migrate: sync: pq: multiple primary keys for table "version" are not allowed`

**Environment:**
Gitea 1.22.2 and Cockroach v24.2.0 (in container)

**Additional context**

I gave it an other try after removing the primary key from the table "version", but the same occured.

Gitea uses ORM on top of the DB, also handling and modifying the schema.

Gitea works well with a traditional PostgreSQL server.

Jira issue: CRDB-42492

Epic CRDB-16356

Contributor guide

Open the contributing guide

Research direction

Start with Jira issue CRDB-42492 and reproduce the Gitea 1.22.2 installation using CockroachDB v24.2.0 as a PostgreSQL source. Investigate the reported duplicate-primary-key migration error around the `version` table; done means Gitea installs successfully without that schema error.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.