Truncating data in SQL server after a set period, best practices with Ignition


We have ignition set up with a database connection. We want to reduce the data resolution after a specified period (e.g. 30 days) to reduce the data size on our servers.

What are the best practises for this when using Ignition?

Do we make the scripts on the database it self or can this be done from Ignition gateway?