model: make versions.id primary key, add versions.n