Add code that writes migration files.

This version successfully creates a rails app that db:migrates and successfully runs on a server.