Skip to content

Commit

Permalink
Fix hasRows check for entity history
Browse files Browse the repository at this point in the history
  • Loading branch information
JonoPrest committed Nov 19, 2024
1 parent b27e25e commit a39f930
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module General = {
type existsRes = {exists: bool}

let hasRows = async (sql, ~table: Table.table) => {
let query = `SELECT EXISTS(SELECT 1 FROM public.${table.tableName});`
let query = `SELECT EXISTS(SELECT 1 FROM public."${table.tableName}");`
switch await sql->Postgres.unsafe(query) {
| [{exists}] => exists
| _ => Js.Exn.raiseError("Unexpected result from hasRows query: " ++ query)
Expand Down

0 comments on commit a39f930

Please sign in to comment.