Allow index definitions on specific databases.

[ close #2615 ]