diff --git a/lib/expr.ex b/lib/expr.ex index 2fb47a1..7346f0d 100644 --- a/lib/expr.ex +++ b/lib/expr.ex @@ -12,12 +12,12 @@ defmodule AshPostgres.Expr do Contains, DateAdd, DateTimeAdd, + Error, FromNow, GetPath, If, Length, Now, - Error, StringJoin, StringSplit, Today, diff --git a/lib/migration_generator/ash_functions.ex b/lib/migration_generator/ash_functions.ex index ca6c695..65f29f4 100644 --- a/lib/migration_generator/ash_functions.ex +++ b/lib/migration_generator/ash_functions.ex @@ -147,7 +147,7 @@ defmodule AshPostgres.MigrationGenerator.AshFunctions do \"\"\") execute(\"\"\" - CREATE OR REPLACE FUNCTION ash_raise_error(json_data json, type_signal ANYCOMPATIBLE) + CREATE OR REPLACE FUNCTION ash_raise_error(json_data jsonb, type_signal ANYCOMPATIBLE) RETURNS ANYCOMPATIBLE AS $$ BEGIN -- Raise an error with the provided JSON data. diff --git a/priv/test_repo/migrations/20231214220937_install_ash-functions_extension_2.exs b/priv/test_repo/migrations/20231214220937_install_ash-functions_extension_2.exs index 540d8a6..d3192fd 100644 --- a/priv/test_repo/migrations/20231214220937_install_ash-functions_extension_2.exs +++ b/priv/test_repo/migrations/20231214220937_install_ash-functions_extension_2.exs @@ -21,7 +21,7 @@ defmodule AshPostgres.TestRepo.Migrations.InstallAshFunctionsExtension2 do """) execute(""" - CREATE OR REPLACE FUNCTION ash_raise_error(json_data json, type_signal ANYCOMPATIBLE) + CREATE OR REPLACE FUNCTION ash_raise_error(json_data jsonb, type_signal ANYCOMPATIBLE) RETURNS ANYCOMPATIBLE AS $$ BEGIN -- Raise an error with the provided JSON data. @@ -40,4 +40,4 @@ defmodule AshPostgres.TestRepo.Migrations.InstallAshFunctionsExtension2 do "DROP FUNCTION IF EXISTS ash_raise_error(jsonb), ash_raise_error(jsonb, ANYCOMPATIBLE)" ) end -end \ No newline at end of file +end diff --git a/test/error_expr_test.ex b/test/error_expr_test.exs similarity index 94% rename from test/error_expr_test.ex rename to test/error_expr_test.exs index 8e37df0..ff72301 100644 --- a/test/error_expr_test.ex +++ b/test/error_expr_test.exs @@ -1,6 +1,6 @@ defmodule AshPostgres.ErrorExprTest do use AshPostgres.RepoCase, async: false - alias AshPostgres.Test.{Api, Author, Comment, Post} + alias AshPostgres.Test.{Api, Post} require Ash.Query import Ash.Expr diff --git a/test_snapshot_path/extensions.json b/test_snapshot_path/extensions.json index 08e5809..d134b4d 100644 --- a/test_snapshot_path/extensions.json +++ b/test_snapshot_path/extensions.json @@ -1,10 +1,10 @@ { - "ash_functions_version": 1, "installed": [ "ash-functions", "uuid-ossp", "pg_trgm", "citext", "demo-functions_v1" - ] + ], + "ash_functions_version": 2 } \ No newline at end of file