From bfee360bfdcaf2e97bbc2fc42f1cc21fd7dc6383 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Sun, 12 May 2024 12:45:28 -0400 Subject: [PATCH] chore: fix spacing in migrations --- lib/ash_money/ash_postgres_extension.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ash_money/ash_postgres_extension.ex b/lib/ash_money/ash_postgres_extension.ex index bb323c7..525aab2 100644 --- a/lib/ash_money/ash_postgres_extension.ex +++ b/lib/ash_money/ash_postgres_extension.ex @@ -22,9 +22,9 @@ if Code.ensure_loaded?(AshPostgres.CustomExtension) do def install(0) do """ + #{Money.DDL.execute_each(Money.DDL.create_money_with_currency())} #{Money.DDL.execute_each(add_money_sub())} #{Money.DDL.execute_each(add_money_neg())} - #{Money.DDL.execute_each(Money.DDL.create_money_with_currency())} #{Money.DDL.execute_each(Money.DDL.define_plus_operator())} #{Money.DDL.execute_each(Money.DDL.define_minmax_functions())} #{Money.DDL.execute_each(Money.DDL.define_sum_function())} @@ -68,6 +68,7 @@ if Code.ensure_loaded?(AshPostgres.CustomExtension) do END; $$; + CREATE OPERATOR - ( rightarg = money_with_currency, procedure = money_neg @@ -79,6 +80,7 @@ if Code.ensure_loaded?(AshPostgres.CustomExtension) do """ DROP OPERATOR -(none, money_with_currency); + DROP FUNCTION IF EXISTS money_neg(money_1 money_with_currency); """ end @@ -108,6 +110,7 @@ if Code.ensure_loaded?(AshPostgres.CustomExtension) do END; $$; + CREATE OPERATOR - ( leftarg = money_with_currency, rightarg = money_with_currency, @@ -121,6 +124,7 @@ if Code.ensure_loaded?(AshPostgres.CustomExtension) do """ DROP OPERATOR - (money_with_currency, money_with_currency); + DROP FUNCTION IF EXISTS money_sub(money_1 money_with_currency, money_2 money_with_currency); """ end