Fixes using the library without DB

Without this change, you can't migrate a empty database because the model's table doesn't exist yet.