Page 1 of 1

Cleaning ES3 MySql database

Posted: Fri Dec 07, 2018 1:09 am
by nFighter
I just saw that in a year my database grow up quite big. Is there some way to make a cleaning using native ES actions? Something like delete cloud files by mask, or get the list of all files from mysql (so I could sort the unused one and delete them)?

I understand that it's an easy task for a simple MySql query, but It need to be synced with Unity's data so it's actually quite tricky in my case :roll:

Re: Cleaning ES3 MySql database

Posted: Fri Dec 07, 2018 10:37 am
by Joel
Hi there,

As data can only be deserialised in Unity, you would need to download each piece of data and determine yourself whether a particular piece of data needs deleting.

To get a list of all files from the server, you can use the ES3Cloud.DownloadFilenames method.

All the best,
Joel

Re: Cleaning ES3 MySql database

Posted: Fri Dec 07, 2018 1:51 pm
by nFighter
Perfect! Got it! it's a playamaker's ES3 Cloud Download Filenames Action in my case!

Re: Cleaning ES3 MySql database

Posted: Sun Feb 03, 2019 8:02 pm
by nFighter
Sorry for opening the old topic, but I believe something goes wrong.

I just run the action with my URL/API and it returns me an array with 29 files. But actually my database have more than 3 thousand files... :?
Image

Re: Cleaning ES3 MySql database

Posted: Mon Feb 04, 2019 7:13 pm
by Joel
Hi there,

I've had no other reports of this, and unfortunately it's not possible for me to tell what is happening without replicating it at my end. Please could you send me a very basic project which replicates this?

Also, assuming it contains no sensitive data, please could you PM me a dump of your MySQL data as a .sql file so that I can recreate the database at my end and understand what is happening?

All the best,
Joel

Re: Cleaning ES3 MySql database

Posted: Fri Sep 13, 2019 9:54 am
by jp1976
Hi both,

I've had the same error with my project - using ES3Cloud.DownloadFilenames returns only 21 rows where as my database has 36.

Any thoughts/solutions?

A regular PHP statement "$data = $db->query('SELECT filenames FROM tablename')->fetchAll(PDO::FETCH_COLUMN);" returns all 36 rows.


Thanks,

James.

Re: Cleaning ES3 MySql database

Posted: Fri Sep 13, 2019 5:51 pm
by Joel
Hi there,

This issue was fixed a few updates ago, so updating from the Asset Store should solve your issue. You should also check you're using the latest ES3Cloud.php on your server.

All the best,
Joel