Is there anyway to delete/destroy all
Is there anyway to delete/destroy all records from a specific table?
15 Replies
Hey, what do you mean by table exactly pg ones ? a specific object or view ?
A object
I need to recreate a custom object, orders.
If it's a custom object you should be able to delete the whole object resulting in all records destruction
If not you can use the batch delete and batch destroy
Yep! But If do so, I will lost the metadata for recreate it
Indeed
What do you mean by ordering exactly ? The positions ?
I mean, Orders...
It's a custom object that holl all orders
not "ordering"
Haha ok
I just want to truncate the custom object. Thr batch delete/destroy seems the way to go.
Exactly
Could u me point the doc?
Do you want it to be done programmatically or would a one shot UI trick do the trick for you ?
Both works for me.
Is it possible to do it from UI?
I think so, unsure about how behaves the select all on top left and pagination
About to give it a try locally
Anyway, you should be able to find two mutations:
- deleteManyOrders ( soft deletion )
- destroyManyOrders ( hard delete )
In your
core API playground
There's might be a programmatic max threshold on how many records can be passed might have to loop over paginationOK dokey!
taks!
tks!
Yw ! feel free to reach out