Migrations fail if SQL file exists that is commented out

Author: dvasdekisCreated Sep 5, 2019Updated Sep 22, 2026
Labelsc/server

Hi folks,

I was able to create a failure on boot that blocked the server from starting by including the below in a SQL migrations file:

/* Below doesn't work!
DROP TRIGGER IF EXISTS trigger_tbl_stg_option_details_update_time_checked ON tbl_stg_option_details;
CREATE OR REPLACE FUNCTION fx_tbl_stg_option_details_update_time_checked()
RETURNS trigger AS 'BEGIN
UPDATE tbl_stg_option_details
    SET NEW.time_checked = now();
END' LANGUAGE 'plpgsql';

CREATE TRIGGER trigger_tbl_stg_option_details_update_time_checked
  AFTER UPDATE OF return_json
  ON tbl_stg_option_details
  FOR EACH ROW
  EXECUTE PROCEDURE fx_tbl_stg_option_details_update_time_checked();
*/

Irrespective if the trigger works or doesn't etc., the statement should be ignored as it is commented out.

Thanks again! Your product is wonderful and this problem was easy to pinpoint :)

Am using hasura/graphql-engine:latest.cli-migrations docker image (beta 6)