You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried migrating a Gitea instance from Sqlite to Postgres. [1] and [2] lead me to believe that this is possible now. What I did:
gitea dump -c /path/to/app.ini -d postgres
Copy the generated gitea-db.sql to my Postgres container
psql -U gitea gitea -f gitea-db.sql inside my container
During the import, a lot of errors were logged to stdout. Here is the collected output: stderr.log
I tried with Postgres 10 and 11. The issue seems to be rooted in the generated sql as CREATE TABLE IF NOT EXISTS "user" ( ... "must_change_password" BOOL DEFAULT 0 NOT NULL ...); causes an error in Postgres. Postgres expects 't' or 'f' for boolean values or requires an explicit cast [3].
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
[x]
):Description
I tried migrating a Gitea instance from Sqlite to Postgres. [1] and [2] lead me to believe that this is possible now. What I did:
gitea dump -c /path/to/app.ini -d postgres
gitea-db.sql
to my Postgres containerpsql -U gitea gitea -f gitea-db.sql
inside my containerDuring the import, a lot of errors were logged to stdout. Here is the collected output: stderr.log
I tried with Postgres 10 and 11. The issue seems to be rooted in the generated sql as
CREATE TABLE IF NOT EXISTS "user" ( ... "must_change_password" BOOL DEFAULT 0 NOT NULL ...);
causes an error in Postgres. Postgres expects't'
or'f'
for boolean values or requires an explicit cast [3].Related
[1] #5651
[2] #5680
[3] https://stackoverflow.com/questions/7947814/pgerror-error-column-is-required-is-of-type-boolean-but-expression-is-of-typ
The text was updated successfully, but these errors were encountered: