Fix detection false positive
Support db/structure.sql

Closes #309.