How to proceed with DB cleanup after deleting Tailor blueprints without access to terminal?

I’d like to know hot to proceed when a blueprint and the information (and table) that it generated are no loger needed. If I just delete the blueprint, de DB table and it’s information are still there. I’d like both to be gone.
In fact I noticed that it’s possible using artisan command. But is it possible to do it without access to a terminal (for example in shared hosting) ?

Hi @federico.schafer

Yes, we will very likely implement a background process to perform garbage collection at some stage. There are considerations to this since October has a general policy to never destroy data. In this case, the garbage collector will need to be certain about what it deletes.

The artisan command will delete all the tables or a single blueprint one at a time, making it more of a developer command.

1 Like

Can you explain to me how to completely remove tailor blueprints ? i make one my blueprint for test and now i need to completele delete that

Delete the blueprint from the app/blueprints directory.

Run the tailor:prune command.

php artisan tailor:prune

Hi Sam, could you elaborate on how we would clean up orphaned files that previously were associated with Tailor records? I have about 12 gigs of data that I need to clear because of an import process I’ve been trying to perfect.

I’ve tried:

php artisan tailor:prune
php artisan tailor:refresh

Then I’ve proceeded with:

php artisan october:util purge uploads
php artisan october:util purge orphans

But the files persist…

It would be good if we could have a fail safe way of deleting both database entries and their associated files from the system.

A usecase I could think of might be if a client mistakenly uploaded copyrighted material to a Tailor record in a fileupload field. He might delete the Tailor record, but the file would still reside on the filesystem, and even worse: that file would still be accessible to people with the direct link, which would still make him liable… Do you have an idea of a workaround?

Oh, the tailor:prune command won’t delete attachments, or associated records, since the tables are simply dropped. We may need to include additional logic to the prune command to clean up the system_files table.