Fix config for PosgreSQL on Travis.
Fix SQLite tests.
Reset database migration after tests.