How to delete tuples added to test a setup

The idea is to avoid to reset all the DB (the records - tuples actually - created being there just for the purpose of testing the DB setup)

For the moment I have only a raw test tree of Entities where tuples should be deleted after a Setup done with install-seed-initial on a POS instance

For the POS

Of course it's not a real tree (it has many roots) and the cleaning should begin by the leaves and rolled up... I did by hand for now (to have a trace). It should not be too hard to extent...

OrderHeader
    OrderItem
        OrderItemBilling
        OrderItemShipGroupAssoc
    OrderAdjustment (none if any taxes or promotion have been used)
    OrderItemShipGroup
    OrderPaymentPreference
        Payment
            PaymentApplication
    OrderRole
    OrderStatus
    PosTerminalLog
Invoice
    InvoiceContactMech
    InvoiceItem
    InvoiceRole
    InvoiceStatus
  • No labels

4 Comments

  1. My preference would be for this to move the wiki space, deleting database records prior to going in to production (or at any other point really) is not a best practice that I would like to see promoted. It is the role of the ext data reader (plus other custom readers when necessary) to contain all data needed for a dev/staging refresh or production deployment.

    1. Hi Scott,

      Yes you are right, I should better use ext-test. I will keep this page for the moment and I think I will remove it later (at least to allow you to read my answer (wink) )

  2. Finally restored, can still be helpful in some cases (the tree I mean, for instane if ever we envision to use ON DELETE CASCADE, but this obviously needs more thoughts)