mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #919] Migrate DB to postgres: column "password_hash_v2" of relation "users" does not exist #334
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#334
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hobbabobba on GitHub (Jun 22, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/919
I want to migrate my sqlite-DB to postgres.
The migration in my test-stage went smooth, i just followed https://github.com/lldap/lldap/blob/main/docs/database_migration.md
The migration in production show an error message. After i execute
psql -d <database> -U <username> -W < /path/to/dump.sqlI get the error messageI use the image
2024-06-16-alpineAny idea what i did wrong? I am very sure that i did everything in the same way like on my test-stage.
@nitnelave commented on GitHub (Jun 22, 2024):
That's strange, since there's no mention of a password_hash_v2 anywhere in the code.
Could you share your SQL dump, the part where it sets up the schema? Everything except the inserts.EDIT: Oh, wait, the dump should only contain inserts, the schema is created independently. Can you list the columns that the insert is trying to populate?
@Hobbabobba commented on GitHub (Jun 22, 2024):
how do i do that in postgres?
@nitnelave commented on GitHub (Jun 22, 2024):
Just one line of the dump.sql file should be enough, truncated after the columns
@Hobbabobba commented on GitHub (Jun 22, 2024):
should be this part
I tried to migrate it with pgloader and got this result
@nitnelave commented on GitHub (Jun 22, 2024):
Assuming you have a backup of your SQLite DB (if you don't, make one now), can you open the DB in sqlite3 and run
ALTER TABLE users DROP COLUMN password_hash_v2;And then try to migrate again?
@Hobbabobba commented on GitHub (Jun 22, 2024):
perfect, now i can migrate the data. Thank you!