Check this one out. It is unfortunate that grafana does not provide guidance on this
i have checked this link but it didnt work .
but the logs are showing like this
logger=ngalert.scheduler t=2022-12-29T05:24:10.001077725Z level=error msg=“Failed to update alert rules” error=“failed to get alert rules: failed to fetch a list of folders that contain alert rules: pq: argument of IS TRUE must be type boolean, not type bigint”
Seems like you still have some issues with data types
i have changed the datatypes from bigint to boolean in alert related tables .
hey shruti , you got any resolution on this migration , right now i am also facing same error.
ALTER TABLE dashboard ALTER COLUMN is_folder DROP DEFAULT;
ALTER TABLE dashboard ALTER is_folder TYPE bool USING CASE WHEN is_folder = 0 THEN FALSE
WHEN is_folder = 1 THEN TRUE
ELSE NULL
END;
ALTER TABLE dashboard ALTER COLUMN is_folder SET DEFAULT FALSE;
ALTER TABLE user_auth_token ALTER COLUMN auth_token_seen DROP DEFAULT;
ALTER TABLE user_auth_token ALTER auth_token_seen TYPE bool USING CASE WHEN auth_token_seen = 0 THEN FALSE
WHEN auth_token_seen = 1 THEN TRUE
ELSE NULL
END;
ALTER TABLE user_auth_token ALTER COLUMN auth_token_seen SET DEFAULT true;
for alert manager:
ALTER TABLE alert_configuration ALTER COLUMN “default” DROP DEFAULT;
ALTER TABLE alert_configuration ALTER “default” TYPE bool USING CASE WHEN “default” = 0 THEN FALSE
WHEN “default” = 1 THEN TRUE
ELSE NULL
END;
ALTER TABLE alert_configuration ALTER COLUMN “default” SET DEFAULT false;
ALTER TABLE data_keys ALTER COLUMN active DROP DEFAULT;
ALTER TABLE data_keys ALTER active TYPE bool USING CASE WHEN active = 0 THEN FALSE
WHEN active = 1 THEN TRUE
ELSE NULL
END;
ALTER TABLE data_keys ALTER COLUMN active SET DEFAULT true;