Sqlite compatibility

SQLite (used by Wikimedia Jenkins) does not let one create an index
inside the CREATE TABLE statement. Decouple them.

Bug: 65876
Change-Id: I01a7339fcd9ea0d9b8e7e5459017f45ba5fdf3df