-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix migration v292 #30153
Fix migration v292 #30153
Conversation
* upstream/main: Remove fomantic checkbox module (go-gitea#30162) Refactor topic Find functions and add more tests for pagination (go-gitea#30127) replace jquery-minicolors with coloris (go-gitea#30055) Add API for `Variables` (go-gitea#29520) Fix `DEFAULT_SHOW_FULL_NAME=false` has no effect in commit list and commit graph page (go-gitea#30096) Fix migration v292 (go-gitea#30153) Adjust VS Code debug filename match in .gitignore (go-gitea#30158) Prevent re-review and dismiss review actions on closed and merged PRs (go-gitea#30065) Render code tags in commit messages (go-gitea#30146) Bump `@github/relative-time-element` to v4.4.0 (go-gitea#30154) Migrate font-family to tailwind (go-gitea#30118) Move from `max( id )` to `max( index )` for latest commit statuses (go-gitea#30076) Remember login for a month by default (go-gitea#30150)
I believe I still have an issue with the new migration. It says: "Ensure every project has exactly one default column". It tries to do some SQL queriy on the I'm using Docker
When I currently dump the project & project_board schema, it looks like this (hope this helps): Project table: CREATE TABLE "public"."project" (
"id" bigint DEFAULT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
"title" text NOT NULL,
"description" text,
"repo_id" bigint,
"creator_id" bigint NOT NULL,
"is_closed" boolean,
"board_type" bigint,
"type" bigint,
"created_unix" bigint,
"updated_unix" bigint,
"closed_date_unix" bigint,
"card_type" integer DEFAULT '0' NOT NULL,
"owner_id" bigint,
CONSTRAINT "project_pkey" PRIMARY KEY ("id")
) WITH (oids = false); Project board table: CREATE TABLE "public"."project_board" (
"id" bigint DEFAULT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
"title" text,
"default" bigint DEFAULT '0' NOT NULL,
"project_id" bigint NOT NULL,
"creator_id" bigint NOT NULL,
"created_unix" bigint,
"updated_unix" bigint,
"sorting" integer DEFAULT '0' NOT NULL,
"color" character varying(7),
CONSTRAINT "project_board_pkey" PRIMARY KEY ("id")
) WITH (oids = false); |
Fix #29874 (comment)
The migration of v292 will miss many projects. These projects will have no default board. This PR introduced a new migration number and removed v292 migration.
This PR also added the missed transactions on project-related operations.
Only
SetDefaultBoard
will remove duplicated defaults but not inGetDefaultBoard