-
-
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
Cannot restore gitea-db.sql from mysql to postgresql #13875
Comments
Add double quotes around user table name, ex |
it's already quoted in the dump script |
@jtktam did you add the database argument?
|
yes |
can you test |
What command did you use to try restoring that caused the failure? And what was the failure message? |
I also tried to move from mysql (mariadb) to postgres, but only the first user was added (but the dump has everything), and in the version table there is only an id column (and no version column), this is what I noticed. |
User cannot inserted because keep_activity_private in mysql(mariadb) is null, but real field has status "not null". |
I suspect this is related to the issues I've noted with cross-db dumps in gitea. Ultimately the problem is that the cross db dump does a direct translation of the db schemas without reference to objects attached to those schemas. For most fields this doesn't cause a problem but it does when a db uses things like In the meantime users who want/need previews of this fixed functionality should contact me either on discord or by email. I can provide builds of 1.14.x (and perhaps earlier) with the fixed xorm PRs 1.0.8.x pulled in to gitea so that you can get a fixed migrations scripts and we can work through any issues. |
Could you help to confirm that #15885 resolved the problem? |
I am planning to migrate my Gitea DB from MySQL to PostgreSQL, is this still a valid issue for v1.14.2? If no one knows, I can try to migrate and see what errors/warnings I encounter. |
[x]
):Description
I am currently trying to migrate from mysql to postgresql as the backend database. I did a dump of the current mysql database and everything looks fine.
When I try to run the backup sql file (gitea-db.sql) it is failing on insert into the user table
when I use psql (with the same login credentials and datbase name) and do a "select * from user" i get the built in user table. I think this is why the inserts are failing
I tried to create the database table manually and set the search path to "public" only and it still picks up the built in user table.
what's the workaround?
thanks
The text was updated successfully, but these errors were encountered: