SQLite Migrations: Lift foreign key creation to CREATE TABLE statements

(I'm looking for feedback on a few of the TODOs.)
This will become a rename table operation.