PatchRevertableInterface.php 718 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Setup\Patch;
  7. /**
  8. * Revertable means, that patch can be reverted
  9. *
  10. * All patches (@see PatchInterface) that implement this interfaces should have next values:
  11. * - do not use application layer: like Serilizer, Collections, etc
  12. * - use only some DML operations: INSERT, UPDATE
  13. * - DELETE DML operation is prohibited, because it can cause triggering foreign keys constraints
  14. * - all schema patches are not revertable
  15. */
  16. interface PatchRevertableInterface
  17. {
  18. /**
  19. * Rollback all changes, done by this patch
  20. *
  21. * @return void
  22. */
  23. public function revert();
  24. }