Make seamless transition between new versions

And what is about database? If I changed structure of the database, how can I do versioning here? Use different schemas (PostgreSQL)?