1.0.536.verify.sql 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. -- 1.0.536.verify.sql — 每条 SELECT 必须返回真值
  2. SELECT COUNT(*) = 6
  3. FROM information_schema.tables
  4. WHERE table_schema = DATABASE()
  5. AND table_name IN (
  6. 'mdp_inbound_grant', 'mdp_inbound_request', 'mdp_inbound_envelope',
  7. 'mdp_inbound_snapshot', 'mdp_inbound_conflict', 'mdp_field_map');
  8. SELECT COUNT(*) = 2
  9. FROM information_schema.statistics
  10. WHERE table_schema = DATABASE()
  11. AND table_name = 'mdp_inbound_grant'
  12. AND index_name = 'uk_inbound_grant'
  13. AND (
  14. (seq_in_index = 1 AND column_name = 'access_key')
  15. OR (seq_in_index = 2 AND column_name = 'entity_code'));
  16. SELECT COUNT(*) = 4
  17. FROM information_schema.statistics
  18. WHERE table_schema = DATABASE()
  19. AND table_name = 'mdp_inbound_request'
  20. AND index_name = 'uk_inbound_idem'
  21. AND column_name IN ('tenant_id', 'access_key', 'entity_code', 'idempotency_key');
  22. SELECT COUNT(*) = 5
  23. FROM information_schema.columns
  24. WHERE table_schema = DATABASE()
  25. AND table_name = 'mdp_entity'
  26. AND column_name IN (
  27. 'inbound_enabled', 'inbound_max_rows', 'stale_guard_enabled',
  28. 'silence_alert_hours', 'silence_calendar');