# Relation icingaweb\_user\_preference missing?

**URL:** <https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477>\
**Category:** Icinga Web\
**Created:** [October 14, 2019, 9:37am UTC](https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477 "2019-10-14T09:37:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbodky](https://community.icinga.com/user_avatar/community.icinga.com/dbodky/32/4988_2.png) [@dbodky](https://community.icinga.com/u/dbodky)\
**Post date:** [October 14, 2019, 9:37am UTC](https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477/1 "2019-10-14T09:37:11Z")

</div>

Hello everybody,

we have our current Icinga installation in productive use for around 5 months by now, and avoided creating more than one admin-user for Icingaweb2 until now since we are using alternative frontends for Icinga. The new user just tried to change his preferences (timezones etc.) and got a stacktrace that the relation icingaweb\_user\_preference is missing. I checked this in the backend and it is missing in fact. Is there anything I can do to create this relation retrospectively?

Regards  
Daniel

---

<div class="post-metadata">

**Author:** ![dnsmichi](https://community.icinga.com/user_avatar/community.icinga.com/dnsmichi/32/7721_2.png) [@dnsmichi](https://community.icinga.com/u/dnsmichi)\
**Post date:** [October 14, 2019, 11:07am UTC](https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477/2 "2019-10-14T11:07:46Z")

</div>

Hi,

which version of Icinga Web 2 are you using? Also, please show the tables available in your database backend, e.g. with `mysql icingaweb2 -e 'show tables;'`.

Cheers,  
Michael

---

<div class="post-metadata">

**Author:** ![dbodky](https://community.icinga.com/user_avatar/community.icinga.com/dbodky/32/4988_2.png) [@dbodky](https://community.icinga.com/u/dbodky)\
**Post date:** [October 14, 2019, 11:36am UTC](https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477/3 "2019-10-14T11:36:07Z")

</div>

> [@dnsmichi](#):
>
> Hi,
> 
> which version of Icinga Web 2 are you using? Also, please show the tables available in your database backend, e.g. with `mysql icingaweb2 -e 'show tables;'` .
> 
> Cheers,  
> Michael

I am using Icingaweb2 v2.7.1 with php v7.1.30.

\dt in PostgreSQL for my icingaweb-database shows:

Schema | Name | Type | Owner  
--------±---------------------------±------±----------------  
public | icingaweb\_group | table | icingawebdbuser  
public | icingaweb\_group\_membership | table | icingawebdbuser  
public | icingaweb\_user | table | icingawebdbuser  
(3 rows)

I hope this is what you were asking for 🙂

Cheers.  
Daniel

---

<div class="post-metadata">

**Author:** ![dnsmichi](https://community.icinga.com/user_avatar/community.icinga.com/dnsmichi/32/7721_2.png) [@dnsmichi](https://community.icinga.com/u/dnsmichi)\
**Post date:** [October 14, 2019, 1:19pm UTC](https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477/4 "2019-10-14T13:19:45Z")

</div>

Seems that the import of the schema initially went wrong. I’d say you can just re-run all the 3 statements inside the schema here: [https://github.com/Icinga/icingaweb2/blob/master/etc/schema/pgsql.schema.sql#L79](https://github.com/Icinga/icingaweb2/blob/master/etc/schema/pgsql.schema.sql#L79)

Cheers,  
Michael

---

<div class="post-metadata">

**Author:** ![dbodky](https://community.icinga.com/user_avatar/community.icinga.com/dbodky/32/4988_2.png) [@dbodky](https://community.icinga.com/u/dbodky)\
**Post date:** [October 15, 2019, 8:20am UTC](https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477/5 "2019-10-15T08:20:03Z")

</div>

Thank you very much for the heads up, I will try this and close the thread as soon as I am having access to the environment again.

---

<div class="post-metadata">

**Author:** ![dbodky](https://community.icinga.com/user_avatar/community.icinga.com/dbodky/32/4988_2.png) [@dbodky](https://community.icinga.com/u/dbodky)\
**Post date:** [October 21, 2019, 8:08am UTC](https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477/6 "2019-10-21T08:08:07Z")

</div>

Sorry for the belated reply. Your solution worked like a charm, thank you very much.

---

<div class="post-metadata">

**Author:** ![dnsmichi](https://community.icinga.com/user_avatar/community.icinga.com/dnsmichi/32/7721_2.png) [@dnsmichi](https://community.icinga.com/u/dnsmichi)\
**Post date:** [October 21, 2019, 8:51am UTC](https://community.icinga.com/t/relation-icingaweb-user-preference-missing/2477/7 "2019-10-21T08:51:35Z")

</div>

No worries, we are all people with a day job and often other things delay answers. Thanks for coming back 👍
