File_Live_Vesion table doesn't exist error but the table shouldn't exist

Silverstripe Version: 4.11

Question: A database error is returning Table ‘SS_mysite.File_Live_Versions’ doesn’t exist when it shouldn’t exist in the first place, and when calling flush=1, it disappears and after sometime it comes back again. any ideas?

Thank you in advance for any help!

Why do you believe that the table shouldn’t exist? It’s a standard table for a default Silverstripe installation.

Do you get any unusual messages if you run a dev/build?flush ?

because the standard tables are File, File_Live and File_Versions only

Ah, OK… I misread your initial question… File_Live_Versions does seem unusual.

I think you’ll need to provide a bit more info in that case.

Is this a completely standard install?
Are there any 3rd party modules installed?
What custom code has been added?
Are there any extensions applied to the code, particularly the files / assets code?
What does the trace show (in particular, does it show what’s generating this query)?

Sorry for replying so late to this but I have identified the issue. It was with a package we used, it’s the GitHub - axllent/silverstripe-version-truncator: Automatically delete old SiteTree page versions from Silverstripe which has a method for listing table names and then appending a “_version” to it and for some reason the table names listed has the “_Live” on it generating a “File_Live_Version” table name.