# Reinstate Staff Category

**URL:** <https://meta.discourse.org/t/reinstate-staff-category/52232>\
**Category:** Self-hosting\
**Created:** [2016 年 10 月 30 日午後 2:45 UTC](https://meta.discourse.org/t/reinstate-staff-category/52232 "2016-10-30T14:45:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lxk](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@lxk](https://meta.discourse.org/u/lxk)\
**Post date:** [2016 年 10 月 30 日午後 2:45 UTC](https://meta.discourse.org/t/reinstate-staff-category/52232/1 "2016-10-30T14:45:10Z")

</div>

Short and silly, our staff category was deleted a while ago, is there any (non backup) way to restore this or manually re-create? Can I squeeze the tables back in from a vanilla backup?

The automated nginx reports have nowhere to post now…

---

<div class="post-metadata">

**Author:** ![lxk](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@lxk](https://meta.discourse.org/u/lxk)\
**Post date:** [2017 年 1 月 14 日午前 12:25 UTC](https://meta.discourse.org/t/reinstate-staff-category/52232/2 "2017-01-14T00:25:47Z")

</div>

righto so I think I’ve fixed it, roughly here’s how

Entered Container

`./launcher enter db-container`

Accessed Discourse DB

`su -c 'psql discourse' postgres`

Had a look at the values of the deleted category

`SELECT * FROM site_settings where name = 'staff_category_id'`

This returned ID: 4

Found the Category ID of newly created staff category

`SELECT id FROM categories WHERE name = 'new staff channel'`

This returned ID: 15, which I re-assigned to the staff\_category\_id

```
UPDATE site_settings
SET value='15'
WHERE id='4';
AND name='staff_category_id'

```

---

<div class="post-metadata">

**Author:** ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)\
**Post date:** [2017 年 2 月 12 日午後 5:05 UTC](https://meta.discourse.org/t/reinstate-staff-category/52232/3 "2017-02-12T17:05:25Z")

</div>

I have the same issue, but my problem (I think it’s related to the fact that we have migrated from the stable version to the beta version after deleting the staff category) is that when I run the command

`SELECT * FROM site_settings where name = 'staff_category_id'`

the result is nothing.  
It seems that the id of the staff category does not exist in the container.

Any workaround?

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2024 年 6 月 8 日午後 12:45 UTC](https://meta.discourse.org/t/reinstate-staff-category/52232/4 "2024-06-08T12:45:01Z")

</div>

このトピックは2777日後に自動的に閉じられました。返信はもう許可されていません。
