Open gonzalo opened 1 year ago
I've tried two different methods with different results.
In my previous message I miss mentioning that it is important for us to ensure data is COMPLETELY removed as it can affect the legal requirements.
Method 1 - completely remove all references (FAILS)
drop table if exists oc_deck_assigned_labels, oc_deck_labels, oc_deck_attachment, oc_deck_assigned_users, oc_deck_cards, oc_deck_board_acl, oc_deck_stacks, oc_deck_boards;
delete from oc_appconfig where appid="deck";
In admin logging tab I see "OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_deck_cards' doesn't exist". Checking DB confirms that deck tables do not exist, they have not been recreated as I expected.
I tried some other things but only disabling the app bring back nextcloud to life. Remove and enable the deck app again doesn't make any difference. Restoring a previous DB backup is the only way to recover stable status.
-- Method 2 - truncate tables (almost SUCCESS)
truncate table oc_deck_assigned_labels;
truncate table oc_deck_labels;
truncate table oc_deck_attachment;
truncate table oc_deck_assigned_users;
truncate table oc_deck_cards;
truncate table oc_deck_board_acl;
truncate table oc_deck_stacks;
truncate table oc_deck_boards;
delete from oc_appconfig where appid="deck";
This could be an "valid" method as this allows to completely remove all the stuff from DBs and reinstall the application but I would like to completely remove DB tables and rebuild if necessary. Is it possible to achieve?
For the first method you also need:
DELETE FROM oc_migrations WHERE app = 'deck';
Otherwise they won't be run again to recreate the tables.
Thank you @tcitworld, that made the trick!
I'm modifying the comment above. I think this should be enough to reset/uninstall/purge this application. I think I could be interesting to include it in documentation or even create a specific commando for this.
Regards
Yes, documenting definitely makes sense. Ideally the server would provide a generic way to allow apps to purge their data as with https://github.com/nextcloud/server/issues/5539 so not every app has to implement a specific occ command.
Thanks for this thread!
After half a year of searching why our 10 year old and ever migrated instance of nextcloud stopped working with deck and reinstall brought no success. The trick was:
DELETE FROM oc_migrations WHERE app = 'deck';
As far as I see the tables were not re-created if the app is deactivated and removed via UI.
Deck seems to be an amazing app to complement our current usage of nextcloud, we’ve tested in our testing instance and we are very satisfied.
But as we have a medium size instance, before moving to production we would like to ensure how to completely remove it in case we need to perform that operation. We have not seen anything about this topic i documentation. Can someone point us about it?
Ideally I would like to have an occ purge command like Polls app has (https://github.com/nextcloud/polls/blob/master/README.md), but anyway... Is possible to do it manually? I mean, to completely remove the decks apps I should...
UPDATE MANUAL PROCEDURE
Deck now has been completely removed from your system and you're able to reinstall it