nextcloud/spreed

how to completely reset talk-/spreed-app right?

Closed this issue ยท 20 comments

because of messing around with problem #602 i tried to uninstall and reset the talk-/spreed-app completely... i also found this #578 (comment), that just deleting the 3 talk-tables isn't enough, so i also did

DELETE FROM `prefix_appconfig` WHERE appid='spreed';
DELETE FROM `prefix_activity` WHERE app='spreed';
DELETE FROM `prefix_notifications` WHERE app='spreed';

and nothing spreed-related was there anymore, but after a reinstall of the talk-app at least the 3 talk-tables weren't recreated and therefore the app is unable to create a room and somehow stuck.

additionally i tried the same procedure with a completely fresh installed nextcloud (to minimize the chance that there is a spreed-related entry i missed - so i only found spreed-entries in the appconfig-table), but the result was the same...

is there something i missed? or is there another problem to completely reset the spreed-app, since the described procedure seems not to be enough?

i found some more spreed-/talk-related entries, so i also did

DELETE FROM `prefix_admin_sections` WHERE id='talk';
DELETE FROM `prefix_migrations` WHERE app='spreed';
DELETE FROM `prefix_preferences` WHERE appid='spreed';

and it seems to work again! ๐Ÿ˜ƒ


sorry for bothering with this, but i'm new to manually manipulating databases.

i also still found some entries mentioning somehow "spreed" in the tables "jobs" and "filecache"... should they also be deleted or not?

jobs and migrations also, but filecache no.

thanks @nickvergessen for the quick reply!
i also found some entries mentioning "spreed" in the "admin_settings"-table... i guess its better to also delete them?

doesn't work for me
I try to activate apps :
An exception occurred while executing 'CREATE TABLE oc_talk_signaling (sender VARCHAR(255) NOT NULL, recipient VARCHAR(255) NOT NULL, message LONGTEXT NOT NULL, timestamp INT NOT NULL, INDEX ts_recipient_time (recipient, timestamp)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB ROW_FORMAT = compressed': SQLSTATE[HY000]: General error: 1813 Tablespace for table 'nextcloud_db.'oc_talk_signaling' exists. Please DISCARD the tablespace before IMPORT

@miche7 i'm absolutely NO expert at this topic, but it seems to me, that you maybe cleared every entry in your tables but didn't drop/delete the tables (resp. the table oc_talk_signaling) as a whole...

Thanks for your answer. I try.
Good day

Hello and thank you for your answer. I have no trace of oc_talk table. I erased everything ... And yet I still have the same error message when trying to install Talk.

Warning

โš ๏ธ Use at own risk

This really whips all data, rooms, chats, activities, notifications, ... โš ๏ธ

Note

This was initially written for Talk version 3.1
The Talk table list was updated for Talk 20, but the reset was never tested otherwise.

Clean tables of server and apps:

DELETE FROM `oc_activity` WHERE `app` = 'spreed';
DELETE FROM `oc_activity_mq` WHERE `amq_appid` = 'spreed';
DELETE FROM `oc_appconfig` WHERE `appid` = 'spreed';
DELETE FROM `oc_comments` WHERE `object_type` = 'chat';
DELETE FROM `oc_comments_read_markers` WHERE `object_type` = 'chat';
DELETE FROM `oc_filecache` WHERE `path` LIKE '%/spreed/%';
DELETE FROM `oc_jobs` WHERE `class` LIKE '%Spreed%';
DELETE FROM `oc_migrations` WHERE `app` = 'spreed';
DELETE FROM `oc_notifications` WHERE `app` = 'spreed';
DELETE FROM `oc_preferences` WHERE `appid` = 'spreed';

Delete former tables

DROP TABLE `oc_spreedme_messages`;
DROP TABLE `oc_spreedme_rooms`;
DROP TABLE `oc_spreedme_room_participants`;
DROP TABLE `oc_talk_guests`;
DROP TABLE `oc_talk_participants`;
DROP TABLE `oc_talk_signaling`;
DROP TABLE `oc_videocalls_signaling`;

Delete current tables

DROP TABLE `oc_talk_attachments`;
DROP TABLE `oc_talk_attendees`;
DROP TABLE `oc_talk_bans`;
DROP TABLE `oc_talk_bots_conversation`;
DROP TABLE `oc_talk_bots_server`;
DROP TABLE `oc_talk_bridges`;
DROP TABLE `oc_talk_commands`;
DROP TABLE `oc_talk_consent`;
DROP TABLE `oc_talk_internalsignaling`;
DROP TABLE `oc_talk_invitations`;
DROP TABLE `oc_talk_polls`;
DROP TABLE `oc_talk_poll_votes`;
DROP TABLE `oc_talk_proxy_messages`;
DROP TABLE `oc_talk_reminders`;
DROP TABLE `oc_talk_retry_ocm`;
DROP TABLE `oc_talk_rooms`;
DROP TABLE `oc_talk_sessions`;

Delete cached css files

Inside your data directory there is a appdata_oc*random string* directory. Navigate into that and run the following command:

rm -rf css/spreed/

Delete the app files

In your Nextcloud root (not data directory root, in case you use a non default app-dir adjust the path):

rm -rf apps/spreed/

After all this, you should be able to reinstall the app cleanly from the app store again. In case you are running redis or any other cache, it might be good to wait until the data is invalidated, as e.g. appconfig is cached in there.

Thanx for your advice
but when I want to activate Talk apps, I have this message
image

@nickvergessen

Is this still the recommended way of resetting/deleting talk completely?

Thanks

No, it's incomplete as it was written for a very old version

@nickvergessen Thanks, is there an updated version as I would like to reset mine? If not it would be nice to have an always-up-to-date version in the readme or documentation.
Thanks

Not really. Why do you need it?

Thanks for the help, we would like to do some testing with multiple users.

If I understand correctly all tests (chats, call history, call and video data...) would stay in the database for ever. Is that right?

Either way if we decide to keep talk and start over cleanly or to clean up all data if we do not keep it.

It would be nice to have a button in the gui or a general terminal command to completely delete ALL data related to talk.

Thanks a lot in advance.

Well if you delete a chat all messages and related things are being deleted.

And just for the record:

video data

No video data reaches the server by default.

It would be nice to have a button in the gui or a general terminal command to completely delete ALL data related to talk.

This is way to dangerous to be done by accident and is not going to happen. If you want to test something do your tests in a test environment.

O.k., thanks. So to summarize if I delete all chats (even after years) and uninstall the talk app all data of talk is deleted, right?

That would be good enough for me.

I think so

Thanks, if not it would be nice to see an update here.

I just made nickvergessen process, on a 18.0.4 installed with snap on Ubuntu Xenial (after uninstallation of the Talk app)

The "Delete former tables" part crashed (the tables do not exist).
The other parts worked.
I could reinstall the app from the web interface, I first got an error, the second time it worked...
Not very clean -- but useful.