Skip to content
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

v0.22.5 + postgresql v14 #4102

Closed
vladimirdulov opened this issue Nov 6, 2024 · 1 comment
Closed

v0.22.5 + postgresql v14 #4102

vladimirdulov opened this issue Nov 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@vladimirdulov
Copy link

Describe the bug

The first time it starts, it crashes with the following error:

2024/11/06 09:58:04 ERROR failed to migrate error="strconv.Atoi: parsing \"00_reaction.sql\": invalid syntax\nfailed to convert patch version to int: 00_reaction.sql\ngithub.com/usememos/memos/store.(*Store).getSchemaVersionOfMigrateScript\n\t/home/runner/work/memos/memos/store/migrator.go:233\ngithub.com/usememos/memos/store.(*Store).normalizedMigrationHistoryList\n\t/home/runner/work/memos/memos/store/migrator.go:272\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/home/runner/work/memos/memos/store/migrator.go:151\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/home/runner/work/memos/memos/store/migrator.go:37\nmain.init.func1\n\t/home/runner/work/memos/memos/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041\nmain.main\n\t/home/runner/work/memos/memos/bin/memos/main.go:171\nruntime.main\n\t/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/proc.go:271\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/asm_amd64.s:1695\nfailed to get schema version of migrate script\ngithub.com/usememos/memos/store.(*Store).normalizedMigrationHistoryList\n\t/home/runner/work/memos/memos/store/migrator.go:274\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/home/runner/work/memos/memos/store/migrator.go:151\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/home/runner/work/memos/memos/store/migrator.go:37\nmain.init.func1\n\t/home/runner/work/memos/memos/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041\nmain.main\n\t/home/runner/work/memos/memos/bin/memos/main.go:171\nruntime.main\n\t/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/proc.go:271\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/asm_amd64.s:1695\nfailed to normalize migration history list\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/home/runner/work/memos/memos/store/migrator.go:152\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/home/runner/work/memos/memos/store/migrator.go:37\nmain.init.func1\n\t/home/runner/work/memos/memos/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041\nmain.main\n\t/home/runner/work/memos/memos/bin/memos/main.go:171\nruntime.main\n\t/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/proc.go:271\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/asm_amd64.s:1695\nfailed to pre-migrate\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/home/runner/work/memos/memos/store/migrator.go:38\nmain.init.func1\n\t/home/runner/work/memos/memos/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041\nmain.main\n\t/home/runner/work/memos/memos/bin/memos/main.go:171\nruntime.main\n\t/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/proc.go:271\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/asm_amd64.s:1695"

Postgresql v14.9
Memos v0.22.5

Memos v0.22.4 works well in the same config.

Steps to reproduce

$ mkdir -p /app/code /app/data/data && cd /app/code

$ curl -L https://github.com/usememos/memos/releases/download/v0.22.5/memos_v0.22.5_linux_amd64.tar.gz | tar zxvf -

$ /app/code/memos
--mode prod
--port 8081
--driver postgres
--dsn "postgresql://postgres:password@localhost:5432/memos?sslmode=disable"
--data /app/data/data

The version of Memos you're using.

v0.22.5

Screenshots or additional context

No response

@vladimirdulov vladimirdulov added the bug Something isn't working label Nov 6, 2024
@RoccoSmit
Copy link
Contributor

Duplicate of #3885
See the following pr for more info on how to resolve this #3873
(In short: if you'd like to use PostgreSQL, try the latest version v0.23.0-rc.0)

@boojack boojack closed this as completed Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants