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

imapsql: NewBackend (initSchema): create table users: SQL logic error: AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY (1) #723

Open
DmitriiMukhin opened this issue Aug 30, 2024 · 4 comments
Labels
bug Something isn't working.

Comments

@DmitriiMukhin
Copy link

DmitriiMukhin commented Aug 30, 2024

Describe the bug

Something bad with my build.
imapsql: using transpiled SQLite (modernc.org/sqlite), this is experimental imapsql: NewBackend (initSchema): create table users: SQL logic error: AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY (1)
build from master

Steps to reproduce

  1. Build with GOOS=linux GOARCH=arm64 ./build.sh --static`
  2. Deploy as systemd service on Debian 12 arm64
  3. Edit /ettc/maddy/maddy.conf
  4. Try to start

Log files

go env
GOOS=linux GOARCH=arm64 ./build.sh
maddy.log

Configuration file

/etc/maddy/maddy.conf

Environment information

  • maddy version: 0.7.1+f3a6f32
@DmitriiMukhin DmitriiMukhin added the bug Something isn't working. label Aug 30, 2024
@DmitriiMukhin
Copy link
Author

DmitriiMukhin commented Aug 30, 2024

I figured out that this db-hack doesn't work on my deployment.
I didn't find how to force maddy to run that hack on init db. Also I didn't find how to force maddy to use sqlite3 driver. I think that modernc.org/sqlite also requires dbhack run?

foxcpp added a commit that referenced this issue Aug 31, 2024
Update includes proper check for modernc driver.

See #723
@foxcpp
Copy link
Owner

foxcpp commented Aug 31, 2024

Pushed cbeadf1 that should fix the issue.

@DmitriiMukhin
Copy link
Author

DmitriiMukhin commented Aug 31, 2024

Ok. Thank you. Previous error has gone.
I suppose your commit fixed that issue.

@arisudesu
Copy link
Contributor

@foxcpp not related directly to the issue, but I noticed in linked code that you have strings.HasPrefix(res, "ALERT TABLE"). I don't know of the ALERT statement in any DBMSes, maybe you mistaken for ALTER?

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