SELECT CASE WHEN COUNT(*) = 1 THEN 1 ELSE 0 END AS ok
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
  AND TABLE_NAME = 'mdp_entity'
  AND COLUMN_NAME = 'is_public_template'
  AND IS_NULLABLE = 'NO'
  AND COLUMN_DEFAULT = '0';
