SQL fixing

Deleted migrations, repaired/removed some of the raw sql