You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CrazyShop: generic table names collide with SelfMute in a shared database #63
CrazyShop saves credits and items in two tables with generic names, clients_data and shop_items_data (CrazyShop.sp:197-198). SelfMute also creates a clients_data table, with other columns (mute_type, mute_duration) (SelfMute.sp:1427 for MySQL, SelfMute.sp:1460 for SQLite).
When both plugins use the same database (the same MySQL database, or the same SQLite file), the plugin that starts second runs CREATE TABLE IF NOT EXISTS against the other plugin's table, so it creates nothing and reports no error. All of its queries then fail ("Unknown column 'credits'" on MySQL, "no such column: credits" on SQLite). Nothing is saved, and the only sign is an error in the logs.
#62 adds MySQL to CrazyShop, where a single database shared by several plugins is a common setup. For now its README asks for a dedicated database, which only works around the problem.
Proposal
Give the tables names that belong to the mode, for example fm_crazyshop_credits and fm_crazyshop_items. Existing SQLite data would be moved on start with ALTER TABLE ... RENAME TO, which works on both drivers. The rename should only run when the old clients_data table has a credits column, so a SelfMute table is never renamed.
@Dolly132, you wrote CrazyShop and SelfMute: are you fine with these names and this migration, or would you rather keep the current names on SQLite and prefix them only on MySQL?
Adding mysql support is good in my opinion, and it was planned but I totally forgot about it.
I am aware of the shared names of the tables between Selfmute and Crazyshop, therefore I am with changing the names of the tables on crazyshop mode to something else with a prefix like what you suggested for example.
You can make a new PR for this or simply just edit the mysql PR and change the macros for the tables names
Activity
Dolly132 commentedon Nov 4, 2026
Adding mysql support is good in my opinion, and it was planned but I totally forgot about it.
I am aware of the shared names of the tables between Selfmute and Crazyshop, therefore I am with changing the names of the tables on crazyshop mode to something else with a prefix like what you suggested for example.
You can make a new PR for this or simply just edit the mysql PR and change the
macrosfor the tables names