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
(cherry picked from commit 2978a9cb2cd198d2bf95cd2b1550199f8b380ef4)