I’ve built several test clusters to allow us to upgrade to a current version of Yeti.
I tried to update our database today and got the following error
2025-08-14 17:08:12.501229 I [9890:29280] ActiveRecord::Base -- Migrating to NewRtpStatistics (20220426100841)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "queue_pkey"
DETAIL: Key (queue_id)=(1) already exists.
CONTEXT: SQL statement "insert into pgq.queue (queue_id, queue_name,
queue_data_pfx, queue_event_seq, queue_tick_seq)
values (id, i_queue_name, tblpfx, ev_seq, tick_seq)"
PL/pgSQL function pgq.create_queue(text) line 46 at SQL statement
On the fourth try it got past that, and now I’m seeing this:
PG::InvalidParameterValue: ERROR: extension "yeti" has no update path from version "1.3.9" to version "1.3.4"
More detail:
== 20220717150840 CnameLua: migrating =========================================
-- execute("\n\n alter extension yeti update TO \"1.3.4\";\n alter table class4.customers_auth add cnam_database_id smallint references class4.cnam_databases(id);\n alter table class4.customers_auth_normalized add cnam_database_id smallint;\n alter table class4.cnam_databases\n
add response_lua varchar,\n add request_lua varchar,\n add drop_call_on_error boolean not null default false;\n ")
2025-08-15 09:09:35.760648 I [19000:29280] ActiveRecord::Base -- Migrating to CnameLua (20220717150840)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
PG::InvalidParameterValue: ERROR: extension "yeti" has no update path from version "1.3.9" to version "1.3.4"
yeti=# select * from pg_extension where extname = 'yeti';
-[ RECORD 1 ]--+------
oid | 17343
extname | yeti
extowner | 10
extnamespace | 16606
extrelocatable | t
extversion | 1.3.9
extconfig |
extcondition |
I edited 20220717150840_cname_lua.rband 20220805080124_process_diversion.rb, which allowed the migration to get past that.
The latest error is
cannot drop column balance_low_threshold of table accounts because other objects depend on it
Caused by 20221015082627_create_account_balance_notification_settings.rb
I’ll run the upgrade a few more times to see if it gets past that, but I’m not sure it will.
Full error
2025-08-18 14:56:21.690474 I [60227:worker-1] Rails -- sentry -- Unreported Event: PG::DependentObjectsStillExist: ERROR: cannot drop column balance_low_threshold of table accounts because other objects depend on it (PG::DependentObjectsStillExist)
DETAIL: view v_billing_accounts depends on column balance_low_threshold of table accounts
HINT: Use DROP ... CASCADE to drop the dependent objects too.
There is no such view in yeti databases. It means structure of your database was manually modified and differs from what yeti expects. You have to revert such modifications first.
Thank you, I’ve removed the foreign views and managed to get a few steps futher.
The next issue I’ve encountied is:
PG::ForeignKeyViolation: ERROR: insert or update on table "gateways" violates foreign key constraint "gateways_termination_dst_numberlist_id_fkey" (PG::ForeignKeyViolation)
DETAIL: Key (termination_dst_numberlist_id)=(883) is not present in table "numberlists".
I ran the migrate a few times but didn’t get past this
I’ll look in the DB and see if I can provide further feedback
This looks like a DB inconsistancy - I’ll see if I can update the Gateway in the IU to resolve the issue
select id,termination_dst_numberlist_id from class4.gateways WHERE termination_dst_numberlist_id = 883;
id | termination_dst_numberlist_id
-----+-------------------------------
220 | 883
select id,created_at from class4.numberlists where id > 880 and id < 889;
id | created_at
-----+-------------------------------
881 | 2022-04-27 08:53:26.00276+10
882 | 2022-04-27 08:53:32.60485+10
886 | 2022-05-06 12:14:09.39765+10
887 | 2022-05-11 11:25:41.486707+10
888 | 2022-05-11 13:38:31.850265+10
(5 rows)
I’m working on these problematic items - looks like staff deleted numberlists that were attached to gateways