{
  "db_name": "PostgreSQL",
  "query": "WITH del AS (\n             DELETE FROM asset WHERE workspace_id = $1 AND usage_kind = 'script'\n               AND usage_path = (SELECT path FROM script WHERE hash = $2 AND workspace_id = $1)\n             RETURNING usage_access_type\n           )\n           INSERT INTO notify_event (channel, payload)\n           SELECT 'notify_asset_producer_change', $1\n           WHERE EXISTS (SELECT 1 FROM del WHERE usage_access_type IN ('w', 'rw'))",
  "describe": {
    "columns": [],
    "parameters": {
      "Left": [
        "Text",
        "Int8"
      ]
    },
    "nullable": []
  },
  "hash": "1f375b37ff9f6f01972e284e84a7b2f9d2d323a3da55f20ff6671e8eba510043"
}
