upgrade_ph_task_cleanup.sql 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. {**************************************************************************}
  2. {* *}
  3. {* Licensed Materials - Property of IBM and/or HCL *}
  4. {* *}
  5. {* IBM Informix Dynamic Server *}
  6. {* (c) Copyright IBM Corporation 2011
  7. {* (c) Copyright HCL Technologies Ltd. 2017. All Rights Reserved.
  8. {* *}
  9. {**************************************************************************}
  10. {* If the ph_version table contains an entry for the upgrade_ph_task *}
  11. {* then we should drop the constraint. *}
  12. CREATE PROCEDURE informix.drop_contraint_ph_task_constr2()
  13. DEFINE num_rows INTEGER;
  14. LET num_rows = 0;
  15. SELECT count(*) INTO num_rows FROM ph_version WHERE
  16. object = "upgrade ph_task";
  17. IF num_rows > 0 THEN
  18. ALTER TABLE ph_task DROP CONSTRAINT ph_task_constr2;
  19. END IF
  20. END PROCEDURE;
  21. EXECUTE PROCEDURE drop_constraint_ph_task_constr21234();
  22. DROP PROCEDURE drop_constraint_ph_task_constr21234();