Webtop DB Error

Is there something in /var/log/webtop/webtop.log ?

Not that I can see.
But the command

signal-event nethserver-webtop5-update

stil gives me this:
Jan 14 23:08:17 mail esmith::event[16487]: ERROR: duplicate key value violates unique constraint “settings_pkey”
Jan 14 23:08:17 mail esmith::event[16487]: DETAIL: Key (service_id, key)=(com.sonicle.webtop.contacts, default.showby) already exists.

:thinking:
@Tiago are you sure that all the queries that I gave you to run did not give error ?
In particular those with DELETE ?

1 Like

I have one error, but in the first one.

Here is the output:

[root@mail ~]# su - postgres -c ‘psql webtop5’
psql (9.2.24)
Type “help” for help.
webtop5=# ALTER TABLE “contacts”.“contacts” ADD COLUMN “display_name” varchar(255), ADD COLUMN “company_master_data_id” varchar(36);
ERROR: column “display_name” of relation “contacts” already exists
webtop5=#
webtop5=# UPDATE “contacts”.“contacts” SET “display_name” = TRIM(COALESCE(“firstname”, ‘’) || ’ ’ || COALESCE(“lastname”, ‘’)) WHERE “is_list” IS FALSE;
UPDATE 737
webtop5=#
webtop5=#
webtop5=# UPDATE “contacts”.“contacts” SET “firstname” = “lastname”, “display_name” = “lastname” WHERE “is_list” IS TRUE;
UPDATE 0
webtop5=# DELETE FROM “core”.“user_settings” WHERE (“user_settings”.“service_id” = ‘com.sonicle.webtop.contacts’) AND (“user_settings”.“key” = ‘showby’);
DELETE 0
webtop5=#
webtop5=# DELETE FROM “core”.“domain_settings” WHERE (“domain_settings”.“service_id” = ‘com.sonicle.webtop.contacts’) AND (“domain_settings”.“key” = ‘showby’);
DELETE 0
webtop5=#
webtop5=# DELETE FROM “core”.“settings” WHERE (“settings”.“service_id” = ‘com.sonicle.webtop.contacts’) AND (“settings”.“key” = ‘showby’);
DELETE 0
webtop5=#
webtop5=# \q
[root@mail ~]#
[root@mail ~]# signal-event nethserver-webtop5-update

:thinking: at this point I think it is necessary to ask @matteo.albinola or @gabriele_bulfon for help

Any idea why you get this error ?

Knowing what “signal-event nethserver-webtop5-update” does on the database may be enlightening, something I don’t know because is NethServer specific.

Surely, manipulating the tables manually is never suggested, you never know what you end up with : only WebTop should maniplate the database, a part some very special cases.

The errors shows that during the “update” some data in settings is being writting twice

Gabriele.

Hi @Tiago, forgive the question: are we talking about a new installation or a server in production with data and users in the database?

For @gabriele_bulfon:

among the actions of this event this is performed:

It´s a production server.