Fixed owner searching.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[]
|
||||
11
hasura/migrations/1582151340160_run_sql_migration/up.yaml
Normal file
11
hasura/migrations/1582151340160_run_sql_migration/up.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
- args:
|
||||
cascade: true
|
||||
sql: "CREATE FUNCTION search_owner(search text)\r\nRETURNS SETOF owners AS $$\r\n
|
||||
\ SELECT *\r\n FROM owners\r\n WHERE\r\n search <% (ownr_fn ||
|
||||
' ' || ownr_ln)\r\n ORDER BY\r\n similarity(search, (ownr_fn || ' '
|
||||
|| ownr_ln)) DESC\r\n LIMIT 5;\r\n$$ LANGUAGE sql STABLE;"
|
||||
type: run_sql
|
||||
- args:
|
||||
name: search_owner
|
||||
schema: public
|
||||
type: track_function
|
||||
Reference in New Issue
Block a user