You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
14:23:43.763[info]droptableuser_groups14:23:43.771[info]droptableuser_profiles14:23:43.778[info]==Migrated20241009122254in0.1s
14:23:43.960[info]==Running20241009122253 SecretSanta.Repo.Migrations.Install5Extensions20241009122251.down/0forward14:23:43.961[info]execute"DROP FUNCTION IF EXISTS uuid_generate_v7(), timestamp_from_uuid_v7(uuid), ash_raise_error(jsonb), ash_raise_error(jsonb, ANYCOMPATIBLE), ash_elixir_and(BOOLEAN, ANYCOMPATIBLE), ash_elixir_and(ANYCOMPATIBLE, ANYCOMPATIBLE), ash_elixir_or(ANYCOMPATIBLE, ANYCOMPATIBLE), ash_elixir_or(BOOLEAN, ANYCOMPATIBLE), ash_trim_whitespace(text[])"14:23:43.974[info]execute"DROP OPERATOR >(money_with_currency, money_with_currency);"14:23:43.980[info]execute"DROP OPERATOR >(money_with_currency, numeric);"14:23:43.985[info]execute"DROP FUNCTION IF EXISTS money_gt(money_1 money_with_currency, money_2 money_with_currency);"**(Postgrex.Error) ERROR 2BP01 (dependent_objects_still_exist)cannotdropfunctionmoney_gt(money_with_currency,money_with_currency)becauseotherobjectsdependonithint: UseDROP ...CASCADEtodropthedependentobjectstoo.operator>=(money_with_currency,money_with_currency)dependsonfunctionmoney_gt(money_with_currency,money_with_currency)(ecto_sql3.12.1) lib/ecto/adapters/sql.ex:1096:
...
To get going, I've replaced the generated down/0 with this for now, to get going:
defdowndoexecute(""" DROP FUNCTION IF EXISTS uuid_generate_v7(), timestamp_from_uuid_v7(uuid), ash_raise_error(jsonb), ash_raise_error(jsonb, ANYCOMPATIBLE), ash_elixir_and(BOOLEAN, ANYCOMPATIBLE), ash_elixir_and(ANYCOMPATIBLE, ANYCOMPATIBLE), ash_elixir_or(ANYCOMPATIBLE, ANYCOMPATIBLE), ash_elixir_or(BOOLEAN, ANYCOMPATIBLE), ash_trim_whitespace(text[]); """)execute("DROP EXTENSION IF EXISTS \"citext\"")execute("DROP EXTENSION IF EXISTS \"pg_trgm\"")execute("DROP EXTENSION IF EXISTS \"uuid-ossp\"")execute"DROP TYPE IF EXISTS public.money_with_currency CASCADE;"end
This works, and it reports 35 objects being removed as part of the CASCADE, and I could count 35 rows in the original version of this function, so that suggest to me that something is out of order.
So far I attempted to rearrange things so that all operators were at the top, but that didn't solve it. The next thing I'd try is the aggregates, as I assumed they'd depend on +/-?
The culprit seems to be this one:
execute""" CREATE OR REPLACE FUNCTION money_mult_reverse(money money_with_currency, multiplicator numeric) RETURNS money_with_currency IMMUTABLE STRICT LANGUAGE plpgsql AS $$ BEGIN RETURN money_mult(multiplicator, money); END; $$;"""
The text was updated successfully, but these errors were encountered:
The tail of the error logs:
To get going, I've replaced the generated
down/0
with this for now, to get going:This works, and it reports
35
objects being removed as part of theCASCADE
, and I could count 35 rows in the original version of this function, so that suggest to me that something is out of order.So far I attempted to rearrange things so that all operators were at the top, but that didn't solve it. The next thing I'd try is the aggregates, as I assumed they'd depend on +/-?The culprit seems to be this one:
The text was updated successfully, but these errors were encountered: