+ trigger=pgtrigger.compiler.Trigger(name='update_collection_child_trigger_etag_only', sql=pgtrigger.compiler.UpsertTriggerSql(condition='WHEN (OLD."cf_standard_name" IS DISTINCT FROM (NEW."cf_standard_name") OR OLD."collection_id" IS DISTINCT FROM (NEW."collection_id") OR OLD."created" IS DISTINCT FROM (NEW."created") OR OLD."etag" IS DISTINCT FROM (NEW."etag") OR OLD."forecast_duration" IS DISTINCT FROM (NEW."forecast_duration") OR OLD."forecast_horizon" IS DISTINCT FROM (NEW."forecast_horizon") OR OLD."forecast_perturbed" IS DISTINCT FROM (NEW."forecast_perturbed") OR OLD."forecast_reference_datetime" IS DISTINCT FROM (NEW."forecast_reference_datetime") OR OLD."forecast_variable" IS DISTINCT FROM (NEW."forecast_variable") OR OLD."geometry" IS DISTINCT FROM (NEW."geometry") OR OLD."id" IS DISTINCT FROM (NEW."id") OR OLD."name" IS DISTINCT FROM (NEW."name") OR OLD."properties_datetime" IS DISTINCT FROM (NEW."properties_datetime") OR OLD."properties_end_datetime" IS DISTINCT FROM (NEW."properties_end_datetime") OR OLD."properties_expires" IS DISTINCT FROM (NEW."properties_expires") OR OLD."properties_start_datetime" IS DISTINCT FROM (NEW."properties_start_datetime") OR OLD."properties_title" IS DISTINCT FROM (NEW."properties_title") OR OLD."total_data_size" IS DISTINCT FROM (NEW."total_data_size") OR OLD."unit" IS DISTINCT FROM (NEW."unit"))', declare='DECLARE child stac_api_Item%ROWTYPE;', func="\n-- update related collection\nchild = COALESCE(NEW, OLD);\nUPDATE stac_api_collection SET\n etag = public.gen_random_uuid()\nWHERE id = child.collection_id;\n\nRAISE INFO 'Parent table collection.id=% auto fields updated due to child Item.id=% updates.',\n child.collection_id, child.id;\n\nRETURN child;\n", hash='fd8f0851644f4a1b6a44ea3def7af991b64e7f12', operation='UPDATE', pgid='pgtrigger_update_collection_child_trigger_etag_only_bee6a', table='stac_api_item', when='AFTER')),
0 commit comments