Option to Delete Subscription Plans

    • 378 posts
    July 31, 2018 6:42 PM EDT

    I am not finding it so I thought I would ask...

    Is there a way to delete old subscription plans in admin? I am looking here: www.yoursite.com/admin/payment/package

    But all I see is edit and subscriptions under options. I was able to disable the ones I don't want but I would like to remove them.

    Cheers

    • 275 posts
    August 1, 2018 2:46 AM EDT

    I don't think you can delete Subscription plans, 

    we've found out deleting a User also impacts it.

    Since cancellations and refunds dont really work in real time with subscriptions.

    All you have is a "ledger" to keep record-keeping account of stuff.

    It can create database issues.

     


    This post was edited by playmusician at August 1, 2018 2:47 AM EDT
    • Moderator
    • 6923 posts
    August 1, 2018 5:21 AM EDT

    I was told the same thing back when I asked for this as I found it odd that we can't delete the subscription plans or the deleted members. To me, it bulks up the db. However, a core dev back then said it was not advised to delete that stuff as deleting from a database is always risky and can create issues. 

  • gs
    • 857 posts
    August 1, 2018 8:22 AM EDT

    ==> '...as deleting from a database is always risky and can create issues. ...'

    There are different types of 'deletion'.  IMHO, any good Dev should have a method of removing desired data from their platform.

     

    Sometimes it's simply additional steps/work a Dev doesn't want to do to verify if it's ok to delete and/or archive.

    • 378 posts
    August 1, 2018 8:39 AM EDT
    We do not do refunds but we do have our gateway built in such a way that members can process cancellations in site, upgrade their subscription and even get a retention offer when they do try to cancel.
    playmusician said:

    I don't think you can delete Subscription plans, 

    we've found out deleting a User also impacts it.

    Since cancellations and refunds dont really work in real time with subscriptions.

    All you have is a "ledger" to keep record-keeping account of stuff.

    It can create database issues.

     

     

    • Moderator
    • 6923 posts
    August 2, 2018 5:12 AM EDT
    gs said:

    ==> '...as deleting from a database is always risky and can create issues. ...'

    There are different types of 'deletion'.  IMHO, any good Dev should have a method of removing desired data from their platform.

     

    Sometimes it's simply additional steps/work a Dev doesn't want to do to verify if it's ok to delete and/or archive.

    It's not about the script. This is for any script. It's about the database itself. Deleting from a database can cause stability issues. Here's a basic explanation but there are others online. I just didn't have a lot of time to search. https://www.itprotoday.com/microsoft-sql-server/how-record-deletes-can-cause-index-fragmentation

  • gs
    • 857 posts
    August 2, 2018 1:59 PM EDT

    I apologize, I wasn't blaming the SE script specifically - just making a general statement.  I'm simply saying that deletion of data should be available (and it already is in many areas of SE and tens of thousands? millions? of other products). 

     

    The linked article also mentioned that INSERT and UPDATE (all DML operations) also may cause index fragmentation yet we all need to use these functions (or similar) throughout database platforms, so risky or not, it's been done for decades (most likely, properly in most cases or millions of Users would be screaming at lots of developers about massive data issues).  So it's more of an index issue than data issue, which is easily resolved through other processes (again, just extra step(s)).

     

     

     

     

    • 275 posts
    August 2, 2018 2:08 PM EDT

    Im guessing its some db  initial  design - primary key/foreign key design (cascading etc) thats preventing it.

    My 2 cents ... im just guessing.

     

    For now, Would be great to have user friendly alerts on front-end if the db integrity might be broken or compromised.