Skip to content

Instantly share code, notes, and snippets.

@hinrikus
hinrikus / gitea-downgrade-1.23..1.22.sql
Created May 14, 2025 21:17
Downgrade gitea database (postgresql) from 1.23 to 1.22 revision 310 to 298 for possible migration to forgejo
-- make sure you have a backup
-- tested only with postgresql
alter table issue drop column time_estimate ; -- 311
alter table protected_branch drop column priority; -- 310
drop index "IDX_notification_commit_id", "IDX_notification_issue_id", "IDX_notification_repo_id" , "IDX_notification_source", "IDX_notification_status", "IDX_notification_u_s_uu" , "IDX_notification_updated_by", "IDX_notification_user_id"; -- 309
drop index "IDX_action_r_u_d", "IDX_action_au_r_c_u_d", "IDX_action_c_u", "IDX_action_c_u_d"; -- 308