Sqlite compatibility

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

Bug: 65875
Change-Id: Ifdcd594b3e31e08466983166135f047f997f562e