Database migration issue: 1.15.4 -> 1.21 #11904

Closed
opened 2025-11-02 09:51:28 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @mheden on GitHub (Oct 24, 2023).

Description

When trying to migrate from gitea 1.15.4 to 1.21 I get the following error when migrating the database (sqlite3):

2023/10/24 15:39:21 routers/common/db.go:36:InitDBEngine() [E] ORM engine initialization attempt #9/10 failed. Error: migrate: migration[218]: Improve Action table indices v2 failed: unable to open database file: The system cannot find the path specified.

When restoring the database file and try other gitea versions it starts to fail in with 1.17 which seems to be matching well with:

	// v218 -> v219
	NewMigration("Improve Action table indices v2", v1_17.ImproveActionTableIndices),

When looking at the database file, version has been increased from 189 to 218.

Gitea Version

1.21

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/mheden/9aaaf9bfec0299e7a3e80ee2551113fd

Screenshots

No response

Git Version

No response

Operating System

Windows

How are you running Gitea?

Starting gitea-1.21-gogit-windows-4.0-amd64.exe from a command (cmd.exe) window

Database

SQLite

Originally created by @mheden on GitHub (Oct 24, 2023). ### Description When trying to migrate from gitea 1.15.4 to 1.21 I get the following error when migrating the database (sqlite3): ``` 2023/10/24 15:39:21 routers/common/db.go:36:InitDBEngine() [E] ORM engine initialization attempt #9/10 failed. Error: migrate: migration[218]: Improve Action table indices v2 failed: unable to open database file: The system cannot find the path specified. ``` When restoring the database file and try other gitea versions it starts to fail in with 1.17 which seems to be matching well with: ``` // v218 -> v219 NewMigration("Improve Action table indices v2", v1_17.ImproveActionTableIndices), ``` When looking at the database file, version has been increased from 189 to 218. ### Gitea Version 1.21 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/mheden/9aaaf9bfec0299e7a3e80ee2551113fd ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Windows ### How are you running Gitea? Starting `gitea-1.21-gogit-windows-4.0-amd64.exe` from a command (cmd.exe) window ### Database SQLite
GiteaMirror added the issue/not-a-bug label 2025-11-02 09:51:28 -06:00
Author
Owner

@lunny commented on GitHub (Mar 27, 2024):

Looks like it's unrelated to Gitea. Maybe it's a permission problem.

@lunny commented on GitHub (Mar 27, 2024): Looks like it's unrelated to Gitea. Maybe it's a permission problem.
Author
Owner

@mheden commented on GitHub (Apr 4, 2024):

Yes, you're right, it turned out it was a permission problem. Thanks for your help and for a great piece of software!

@mheden commented on GitHub (Apr 4, 2024): Yes, you're right, it turned out it was a permission problem. Thanks for your help and for a great piece of software!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11904