Cleaning ES3 MySql database

Discussion and help for Easy Save 3
Post Reply
nFighter
Posts: 52
Joined: Thu Apr 12, 2018 7:15 am

Cleaning ES3 MySql database

Post 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:
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Cleaning ES3 MySql database

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
nFighter
Posts: 52
Joined: Thu Apr 12, 2018 7:15 am

Re: Cleaning ES3 MySql database

Post by nFighter »

Perfect! Got it! it's a playamaker's ES3 Cloud Download Filenames Action in my case!
nFighter
Posts: 52
Joined: Thu Apr 12, 2018 7:15 am

Re: Cleaning ES3 MySql database

Post 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
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Cleaning ES3 MySql database

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
jp1976
Posts: 1
Joined: Fri Sep 13, 2019 9:50 am

Re: Cleaning ES3 MySql database

Post 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.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Cleaning ES3 MySql database

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply