Re: [Tiki-users] Dropping abandoned Tables in Tiki-Schema

Jonny Bradley via TikiWiki-users <[email protected]>
Newsgroups gmane.comp.cms.tiki.user
Message-ID <[email protected]>
Hi Manuel

Sorry i didn't get back to you in time, this is a good point - we don't generally drop tables in upgrades just in case people have unbacked up info in them, and lately scripts have renamed obsolete tables with zzz_ in front, but how would you know? ;)

Over time we have added various scripts to tidy up unused tables but only in the "devtools" directory which isn';t part of the release tarballs, but they can all be found here https://gitlab.com/tikiwiki/tiki/-/tree/master/doc/devtools

The most up to date one is here

    https://gitlab.com/tikiwiki/tiki/-/blob/master/doc/devtools/upto_18_drop_unused_tables.sql

and is basically what you worked out yourself! (although you seem to have found a few extra!?)

Obviously all there is no undo so make sure you have a working backup of your database before you start!

So apologies again for not being quicker, happy Tiki'ing!

jonny







> On 17 Sep 2020, at 09:38, Manuel Martin <[email protected]> wrote:
> 
> Hello all,
> 
> after some fiddling I made the following SQL-Script which hopefully deletes superfluous tables.
> 
> I give no guarantees! (And I have no idea why my user database has system tables. Anyone?)
> 
> -- vor Upgrade Schema bereinigen/korrigieren
> 
> use mytiki;
> 
> -- falsche Feldlänge:
> ALTER TABLE `tiki_comments`
>     CHANGE COLUMN `title` `title` VARCHAR(255) DEFAULT NULL;
> 
> -- bereinigen: Galaxia (wurde nie benutzt)
> drop table if EXISTS galaxia_activities;
> drop table if EXISTS galaxia_activity_roles;
> drop table if EXISTS galaxia_instance_activities;
> drop table if EXISTS galaxia_instance_comments;
> drop table if EXISTS galaxia_instances;
> drop table if EXISTS galaxia_processes;
> drop table if EXISTS galaxia_roles;
> drop table if EXISTS galaxia_transitions;
> drop table if EXISTS galaxia_user_roles;
> drop table if EXISTS galaxia_workitems;
> 
> -- weitere(s) nicht im aktuellen Installationsskript
> -- und nicht umgestellt auf InnoDB
> -- und bekannt gedropptes Feature
> drop table if EXISTS tiki_eph;
> 
> drop table if EXISTS tiki_charts;
> drop table if EXISTS tiki_charts_rankings;
> drop table if EXISTS tiki_charts_votes;
> drop table if EXISTS tiki_chart_items;
> drop table if EXISTS tiki_drawings;
> drop table if EXISTS tiki_newsreader_marks;
> drop table if EXISTS tiki_newsreader_servers;
> drop table if EXISTS tiki_page_drafts;
> drop table if EXISTS tiki_quicktags;
> drop table if EXISTS tiki_users;
> drop table if EXISTS tiki_users_score;
> -- Überbleibsel:
> drop table if EXISTS users_score;
> 
> -- seltsame Tabellen:
> drop table if EXISTS zzz_unused_metrics_assigned;
> drop table if EXISTS zzz_unused_metrics_metric;
> drop table if EXISTS zzz_unused_metrics_tab;
> 
> -- Systemtabellen?
> drop table if EXISTS columns_priv;
> drop table if EXISTS db;
> drop table if EXISTS func;
> drop table if EXISTS help_category;
> drop table if EXISTS help_keyword;
> drop table if EXISTS help_relation;
> drop table if EXISTS help_topic;
> drop table if EXISTS host;
> drop table if EXISTS proc;
> drop table if EXISTS procs_priv;
> drop table if EXISTS tables_priv;
> drop table if EXISTS time_zone;
> drop table if EXISTS time_zone_leap_second;
> drop table if EXISTS time_zone_name;
> drop table if EXISTS time_zone_transition;
> drop table if EXISTS time_zone_transition_type;
> drop table if EXISTS user;
> 
> 
> 
> On 15.09.2020 16:58, Manuel Martin wrote:
>> Hello all,
>> 
>> I want to update my slightly outdated Tiki 8.2 installation to 21.2 and find some error message pertaining not yet properly converted tables (to uft8mb4). I'm using MariaDB 10.5 BTW. I *believe* it's not that important mostly, but want to be sure.
>> 
>> Well, my best guess is those are leftovers from features which have been dropped (like galaxia.* or tiki_eph), or they somehow came out of use? They have in common that they are empty and that they have the outdated charset/collation or perhaps special names (zzz_unused*)
>> 
>> Long story short: is there a positive list which tables can be dropped? Or is it 101% safe to drop tables which are not included in tiki.sql? (Theoretically tiki-install.php could just rename things or create tables by other means?)
>> 
>> TIA, Manuel
>> 
>> 
>> 
>> _______________________________________________
>> TikiWiki-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-users
>> 
> 
> 
> _______________________________________________
> TikiWiki-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-users

_______________________________________________
TikiWiki-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.