{"id":297373,"date":"2020-01-20T09:00:23","date_gmt":"2020-01-20T09:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=297373"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=297373","title":{"rendered":"Zero Downtime Deployment \u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/481932\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hr\/vy\/qq\/hrvyqqi2mmitehw9vx_xklbofj8.png\">  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u0434\u0435\u043f\u043b\u043e\u0435. \u041c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u043f\u0440\u043e\u0434\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u044d\u0442\u0430\u043f\u0430\u043c \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440.: \u0434\u0430\u043b\u0435\u0435 \u2014 zero downtime<\/em>). \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043d\u0430\u0448\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438, \u0432\u044b \u0438\u0445 \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/github.com\/spring-cloud-samples\/zero-downtime-deployment\">GitHub<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<h3 id=\"zero-downtime-deployment\">Zero downtime deployment<\/h3>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0437\u0430 \u043c\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 <strong>zero downtime deployment<\/strong>? \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u0442\u0430\u043a, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438. \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u044d\u0442\u043e \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0439 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0434\u0435\u043f\u043b\u043e\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0431\u043e\u0435\u0432 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0438\u0447\u044c? \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u0432\u043e\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e \u21161 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/li>\n<li>\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0438\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0411\u0414<\/li>\n<li>\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e \u2116 2 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u2116 1<\/li>\n<li>\u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u2116 2 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e, \u0443\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e \u2116 1<\/li>\n<li>\u0433\u043e\u0442\u043e\u0432\u043e!<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041b\u0435\u0433\u043a\u043e, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438? \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e, \u0438 \u043c\u044b \u043f\u043e\u0437\u0436\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u044d\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c. \u0410 \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0435\u043f\u043b\u043e\u044f \u2014 blue green deployment.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043e <a href=\"https:\/\/martinfowler.com\/bliki\/BlueGreenDeployment.html\">blue green deployment<\/a>? \u0421 Cloud Foundry \u044d\u0442\u043e \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041f\u0440\u043e\u0441\u0442\u043e \u0433\u043b\u044f\u043d\u044c\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/spring.io\/blog\/2014\/04\/04\/project-sagan-zero-downtime-deployments\">\u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a>, \u0433\u0434\u0435 \u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u041a\u0440\u0430\u0442\u043a\u043e \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u0443\u044f, \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c blue green deployment:<\/p>\n<p>  <\/p>\n<ul>\n<li><em>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u0432\u0443\u0445 \u043a\u043e\u043f\u0438\u0439 \u0432\u0430\u0448\u0435\u0433\u043e production \u043a\u043e\u0434\u0430 (\u201cblue\u201d \u0438 \u201cgreen\u201d);<\/em><\/li>\n<li><em>\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0432 blue \u0441\u0440\u0435\u0434\u0443, \u0442.\u0435. \u0447\u0442\u043e\u0431\u044b URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0442\u0443\u0434\u0430;<\/em><\/li>\n<li><em>\u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 green \u0441\u0440\u0435\u0434\u0435;<\/em><\/li>\n<li><em>\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0441 blue \u043d\u0430 green \u0441\u0440\u0435\u0434\u0443<\/em><\/li>\n<\/ul>\n<p>  <\/p>\n<p>Blue green deployment \u2014 \u044d\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c \u0444\u0430\u043a\u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0440\u0435\u0434\u0443, \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0449\u0435\u043b\u043a\u043d\u0443\u0432 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c\u00bb.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441: \u041a\u0430\u043a\u043e\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 zero downtime \u0438\u043c\u0435\u0435\u0442 \u043a Blue green \u0434\u0435\u043f\u043b\u043e\u044e?<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0436, \u0443 \u043d\u0438\u0445 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u0432\u0443\u0445 \u043a\u043e\u043f\u0438\u0439 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0440\u0435\u0434\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u0432\u043e\u0439\u043d\u044b\u0445 \u0443\u0441\u0438\u043b\u0438\u0439 \u0434\u043b\u044f \u0438\u0445 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u0412\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u0430\u043a \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 <a href=\"https:\/\/martinfowler.com\/bliki\/BlueGreenDeployment.html\">Martin Fowler<\/a>, \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<p><em>\u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u0439 \u0436\u0435 \u0411\u0414, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0441\u0438\u043d\u0435-\u0437\u0435\u043b\u0435\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438 \u0434\u043b\u044f web \u0438 domain layers. \u0412 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u0441\u0445\u0435\u043c\u0443 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. <\/em><\/p>\n<p>  <\/p>\n<p>\u0418 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043c \u043a \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. <strong>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u044d\u0442\u0443 \u0444\u0440\u0430\u0437\u0443.<\/p>\n<p>  <\/p>\n<p><em>\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0438\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0411\u0414.<\/em><\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0435\u0431\u0435 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e? \u0420\u0430\u0437\u0432\u0435 \u043c\u043e\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f? \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f&#8230;<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u0436\u0435 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 zero downtime \/ blue green deployment, \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0441\u043a\u043b\u043e\u043d\u043d\u044b \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0434\u0435\u043f\u043b\u043e\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0441 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/li>\n<li>\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0448\u0435\u043c, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u0434\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438 zero downtime deployment.<\/p>\n<p>  <\/p>\n<h3 id=\"problemy-s-bazoy-dannyh\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c stateless \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0411\u0414, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c zero downtime deployment \u0441\u0440\u0430\u0437\u0443. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0433\u0434\u0435-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0445\u0435\u043c\u0443. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u0443\u0433\u043b\u0443\u0431\u0438\u043c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u043b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0434\u0435\u043f\u043b\u043e\u0439 \u0431\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u044f, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"shema-upravleniya-versiyami\">\u0421\u0445\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438<\/h3>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/flywaydb.org\/\">Flyway<\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440.: \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043f\u0440\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0411\u0414<\/em>). \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Spring Boot, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Flyway \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0441\u0445\u0435\u043c\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Flyway \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u0430\u043f\u043a\u0435 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 <code>classpath:db\/migration<\/code>). \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u2514\u2500\u2500 db  \u2514\u2500\u2500 migration      \u251c\u2500\u2500 V1__init.sql      \u251c\u2500\u2500 V2__Add_surname.sql      \u251c\u2500\u2500 V3__Final_migration.sql      \u2514\u2500\u2500 V4__Remove_lastname.sql<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c 4 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0440\u0430\u043d\u0435\u0435, \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0434\u0438\u043d \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 (<code>V1__init.sql<\/code>) \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">CREATE TABLE PERSON ( id BIGINT GENERATED BY DEFAULT AS IDENTITY, first_name varchar(255) not null, last_name varchar(255) not null );  insert into PERSON (first_name, last_name) values ('Dave', 'Syer');<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u0430\u043c\u043e \u0437\u0430 \u0441\u0435\u0431\u044f: \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SQL, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a \u0432\u0430\u0448\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0430. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e Spring Boot \u0438 Flyway \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/1.3.5.RELEASE\/reference\/html\/howto-database-initialization.html#howto-execute-flyway-database-migrations-on-startup\">Spring Boot Docs<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0441\u043e Spring Boot, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 2 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0432\u044b \u043e\u0442\u0434\u0435\u043b\u044f\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u0434\u0430<\/li>\n<li>\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0432\u044b\u043a\u0430\u0442\u043a\u043e\u0439 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442.\u0435. \u0432\u0430\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0435\u043f\u043b\u043e\u044f \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"reshenie-problem-s-bazoy-dannyh\">\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438 \u0434\u0432\u0443\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/li>\n<li>\u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c zero downtime deployment \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438\u2026 \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u0431\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0435\u0432 \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c Spring Boot Flyway, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c <code>Person<\/code> \u0441 <code>first_name<\/code> \u0438 <code>last_name<\/code> \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440.: <code>Person<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u0430 f<code>irst_name<\/code> \u0438 <code>last_name<\/code> \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u044f \u0432 \u043d\u0435\u0439<\/em>). \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c <code>last_name<\/code> \u0432 <code>surname<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"dopuscheniya\">\u0414\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u0443\u0433\u043b\u0443\u0431\u0438\u043c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0413\u043b\u0430\u0432\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0441\u0442\u0438\u0447\u044c, \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u0417\u0430\u043c\u0435\u0442\u043a\u0430.<\/strong> Business PRO-TIP. \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u043c \u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043d\u0435\u0433 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 (\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043b\u044e\u0434\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0435\u043d\u0435\u0433 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c)!<\/p><\/blockquote>\n<p>  <\/p>\n<h3 id=\"ne-nado-delat-otkat-bazy-dannyh\">\u041d\u0435 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043a\u0430\u0442 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0435\u043f\u043b\u043e\u044f (\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043a\u0430\u0442\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u043a\u0430\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f). \u041c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0440\u0430\u0437\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, SQL \u0438 NoSQL), \u0432\u0430\u0448 deployment pipeline \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e.<\/p>\n<p>  <\/p>\n<p><strong>\u041d\u0430\u0434\u043e, \u0447\u0442\u043e\u0431\u044b \u0412\u0421\u0415\u0413\u0414\u0410 \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u043d\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0437\u0430\u0434 (\u043d\u0435 \u0431\u043e\u043b\u0435\u0435)<\/strong><\/p>\n<p>  <\/p>\n<p>\u041e\u0442\u043a\u0430\u0442 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435\u043b\u0435\u0433\u043a\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u041c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0432\u044b\u043a\u0430\u0442\u043a\u0438 \u0431\u044b\u043b\u043e \u0431\u044b \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e\u0439 \u0438 \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0439.<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u0417\u0430\u043c\u0435\u0442\u043a\u0430<\/strong>. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u0430\u0436\u043e\u0440\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p><\/blockquote>\n<p>  <\/p>\n<h3 id=\"shag-1-ishodnoe-sostoyanie\">\u0428\u0430\u0433 1: \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: <code>1.0.0<\/code><br \/>  \u0412\u0435\u0440\u0441\u0438\u044f \u0411\u0414: <code>v1<\/code><\/p>\n<p>  <\/p>\n<h3 id=\"kommentariy\">\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h3>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"izmeneniya-bd\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0411\u0414<\/h3>\n<p>  <\/p>\n<p>\u0411\u0414 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>last_name.<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">CREATE TABLE PERSON (     id BIGINT GENERATED BY DEFAULT AS IDENTITY,     first_name varchar(255) not null,     last_name varchar(255) not null );  insert into PERSON (first_name, last_name) values ('Dave', 'Syer');<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"izmeneniya-koda\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 Person \u0432 <code>last_name<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\/*  * Copyright 2012-2016 the original author or authors.  *  * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);  * you may not use this file except in compliance with the License.  * You may obtain a copy of the License at  *  *      http:\/\/www.apache.org\/licenses\/LICENSE-2.0  *  * Unless required by applicable law or agreed to in writing, software  * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  * See the License for the specific language governing permissions and  * limitations under the License.  *\/  package sample.flyway;  import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id;  @Entity public class Person {     @Id     @GeneratedValue     private Long id;     private String firstName;     private String lastName;      public String getFirstName() {         return this.firstName;     }      public void setFirstName(String firstName) {         this.firstName = firstName;     }      public String getLastName() {         return this.lastName;     }      public void setLastName(String lastname) {         this.lastName = lastname;     }      @Override     public String toString() {         return &quot;Person [firstName=&quot; + this.firstName + &quot;, lastName=&quot; + this.lastName                 + &quot;]&quot;;     } }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"obratno-nesovmestimoe-pereimenovanie-stolbca\">\u041e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0430<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430:<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/strong> \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043f\u043e\u043b\u043e\u043c\u043a\u0435. \u041c\u044b \u044d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441 \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p><\/blockquote>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: <code>2.0.0.BAD<\/code><\/p>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u0414\u0411: <code>v2bad<\/code><\/p>\n<p>  <\/p>\n<h3 id=\"kommentariy-1\">\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043a\u0443\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u041d\u0415 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u0432\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 (\u0441\u0442\u0430\u0440\u044b\u0439 \u0438 \u043d\u043e\u0432\u044b\u0439) \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, zero downtime deployment \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c (\u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u044f, \u044d\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e).<\/p>\n<p>  <\/p>\n<h3 id=\"ab-testirovanie\">A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0,<\/code> \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0435 \u0432 \u043f\u0440\u043e\u0434\u0435, \u0438 \u0411\u0414 <code>v1<\/code>. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0.BAD<\/code>, \u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e <code>v2bad<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0428\u0430\u0433\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0.BAD<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e <code>v2bad<\/code><\/li>\n<li>\u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <code>v2bad<\/code> \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>last_name<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u2014 \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u043d\u0430 <code>surname<\/code><\/li>\n<li>\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 <code>1.0.0<\/code>, \u0434\u0440\u0443\u0433\u0438\u0435 \u2014 \u0432 <code>2.0.0.BAD<\/code>. \u0412\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0411\u0414 <code>v2bad<\/code><\/li>\n<li>\u0432\u0441\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0<\/code> \u043d\u0430\u0447\u043d\u0443\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>last_name<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442<\/li>\n<li>\u0432\u0441\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0.BAD<\/code> \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c <\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0435\u0441\u043b\u0438 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0411\u0414 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, A\/B \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>  <\/p>\n<h3 id=\"otkat-prilozheniya\">\u041e\u0442\u043a\u0430\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c A\/B deployment (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440.: \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0442\u0443\u0442 \u0430\u0432\u0442\u043e\u0440 \u0438\u043c\u0435\u043b \u0432 \u0432\u0438\u0434\u0443 A\/B \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/em>) \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0.<\/code> \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043a\u0430\u0442 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u0428\u0430\u0433\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u043c\u044b \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0.BAD<\/code><\/li>\n<li>\u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u0435 \u0435\u0449\u0435 <code>v2bad<\/code><\/li>\n<li>\u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0435\u0440\u0441\u0438\u044f <code>1.0.0<\/code> \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <code>surname<\/code>, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0438<\/li>\n<li>\u0430\u0434 \u0432\u044b\u0440\u0432\u0430\u043b\u0441\u044f \u043d\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u0443, \u043c\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0435\u0441\u043b\u0438 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0411\u0414 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"logi-ispolneniya-skripta\">\u041b\u043e\u0433\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/h3>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Backward incompatible scenario:  01) Run 1.0.0 02) Wait for the app (1.0.0) to boot 03) Generate a person by calling POST localhost:9991\/person to version 1.0.0 04) Run 2.0.0.BAD 05) Wait for the app (2.0.0.BAD) to boot 06) Generate a person by calling POST localhost:9991\/person to version 1.0.0 &lt;-- this should fail 07) Generate a person by calling POST localhost:9992\/person to version 2.0.0.BAD &lt;-- this should pass  Starting app in version 1.0.0 Generate a person in version 1.0.0 Sending a post to 127.0.0.1:9991\/person. This is the response:  {&quot;firstName&quot;:&quot;b73f639f-e176-4463-bf26-1135aace2f57&quot;,&quot;lastName&quot;:&quot;b73f639f-e176-4463-bf26-1135aace2f57&quot;}  Starting app in version 2.0.0.BAD Generate a person in version 1.0.0 Sending a post to 127.0.0.1:9991\/person. This is the response:  curl: (22) The requested URL returned error: 500 Internal Server Error  Generate a person in version 2.0.0.BAD Sending a post to 127.0.0.1:9995\/person. This is the response:  {&quot;firstName&quot;:&quot;e156be2e-06b6-4730-9c43-6e14cfcda125&quot;,&quot;surname&quot;:&quot;e156be2e-06b6-4730-9c43-6e14cfcda125&quot;}<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"izmeneniya-bd-1\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0411\u0414<\/h3>\n<p>  <\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442 <code>last_name<\/code> \u0432 <code>surname<\/code><\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 Flyway \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">CREATE TABLE PERSON (     id BIGINT GENERATED BY DEFAULT AS IDENTITY,     first_name varchar(255) not null,     last_name varchar(255) not null );  insert into PERSON (first_name, last_name) values ('Dave', 'Syer');<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442 <code>last_name<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">-- This change is backward incompatible - you can't do A\/B testing ALTER TABLE PERSON CHANGE last_name surname VARCHAR;<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"izmeneniya-koda-1\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/h3>\n<p>  <\/p>\n<p>\u041c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0438\u043c\u044f \u043f\u043e\u043b\u044f <code>lastName<\/code> \u043d\u0430 <code>surname<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"pereimenovanie-stolbca-obratno-sovmestimym-sposobom\">\u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c<\/h3>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041c\u044b \u0443\u0436\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0431\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0435\u0432 \u043c\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c 3 \u0434\u0435\u043f\u043b\u043e\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u0417\u0430\u043c\u0435\u0442\u043a\u0430.<\/strong> \u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0411\u0414 \u0432\u0435\u0440\u0441\u0438\u0438 <code>v1<\/code>. \u041e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u043e\u043b\u0431\u0446\u044b <code>first_name<\/code> \u0438 <code>last_name<\/code>. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c <code>last_name<\/code> \u043d\u0430 <code>surname<\/code>. \u0423 \u043d\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0,<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>surname<\/code>.<\/p><\/blockquote>\n<p>  <\/p>\n<h3 id=\"shag-2-dobavlyaem-surname\">\u0428\u0430\u0433 2: \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c surname<\/h3>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: <code>2.0.0<\/code><br \/>  \u0412\u0435\u0440\u0441\u0438\u044f \u0411\u0414: <code>v2<\/code><\/p>\n<p>  <\/p>\n<h3 id=\"kommentariy-2\">\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h3>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u044f \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0411\u0414. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0442\u043a\u0430\u0442\u0438\u043c JAR \u0438\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u0440\u044b\u0439 JAR, \u043e\u043d \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"vykatyvaem-novuyu-versiyu\">\u0412\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e<\/h3>\n<p>  <\/p>\n<p>\u0428\u0430\u0433\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0438\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0411\u0414, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>surname<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0448\u0430 \u0411\u0414 \u0432\u0435\u0440\u0441\u0438\u0438 <code>v2<\/code><\/li>\n<li>\u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 <code>last_name<\/code> \u0432 <code>surname<\/code>. <strong>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/strong>, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438!<\/li>\n<li>\u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u043e\u0434, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <strong>\u041e\u0411\u0410<\/strong> \u0438 <strong>\u043d\u043e\u0432\u044b\u0439<\/strong>, \u0438 <strong>\u0441\u0442\u0430\u0440\u044b\u0439<\/strong> \u0441\u0442\u043e\u043b\u0431\u0435\u0446. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0<\/code><\/li>\n<li>\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 <code>surname<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 <code>null<\/code>, \u0438\u043b\u0438 \u0438\u0437 l<code>ast_name<\/code>, \u0435\u0441\u043b\u0438 <code>surname<\/code> \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u043e. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c <code>getLastName()<\/code> \u0438\u0437 \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c <code>null<\/code> \u043f\u0440\u0438 \u043e\u0442\u043a\u0430\u0442\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 <code>3.0.0<\/code> \u0434\u043e <code>2.0.0<\/code>.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Spring Boot Flyway, \u044d\u0442\u0438 \u0434\u0432\u0430 \u0448\u0430\u0433\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0<\/code> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e db \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435).<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u0412\u0430\u0436\u043d\u043e. <\/strong>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <strong>\u041d\u0415 \u0414\u041e\u041b\u0416\u0415\u041d<\/strong> \u0431\u044b\u0442\u044c <strong>NOT NULL<\/strong>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043e\u0442\u043a\u0430\u0442, \u0441\u0442\u0430\u0440\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u043d\u043e\u0432\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0435\u0433\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f <code>Insert.<\/code> \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0438 \u0432\u0430\u0448\u0430 \u0411\u0414 \u0431\u0443\u0434\u0435\u0442 <code>v2<\/code>, \u044d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0427\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  <strong>\u0412\u0430\u0436\u043d\u043e.<\/strong> \u0412\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>getLastName()<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 <code>3.0.0<\/code> \u0432 \u043a\u043e\u0434\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 <code>last_name<\/code>. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b null. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 <code>null<\/code>, \u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 <code>getSurname()<\/code> \u0432\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p><\/blockquote>\n<p>  <\/p>\n<h3 id=\"ab-testirovanie-1\">A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0<\/code>, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0435 \u043d\u0430 \u043f\u0440\u043e\u0434\u0435, \u0438 \u0411\u0414 \u0432 <code>v1<\/code>. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043d\u043e\u0432\u0438\u0442 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e <code>v2<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0428\u0430\u0433\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e <code>v2<\/code><\/li>\n<li>\u0442\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0<\/code><\/li>\n<li>\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0<\/code> \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0.<\/code> \u0412\u0441\u0435 \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u0441 \u0411\u0414 \u0432 <code>v2<\/code><\/li>\n<li>\u0432\u0435\u0440\u0441\u0438\u044f <code>1.0.0<\/code> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432 \u0411\u0414 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 surname, \u0430 \u0432\u0435\u0440\u0441\u0438\u044f <code>2.0.0<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442. \u041e\u043d\u0438 \u043d\u0435 \u043c\u0435\u0448\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443, \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c.<\/li>\n<li>\u0432\u0435\u0440\u0441\u0438\u044f <code>2.0.0<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u0432 \u0441\u0442\u0430\u0440\u043e\u043c, \u0442\u0430\u043a \u0438 \u0432 \u043d\u043e\u0432\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/li>\n<\/ol>\n<p>  <\/p>\n<blockquote><p><strong>\u0412\u0430\u0436\u043d\u043e.<\/strong> \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \/ \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043d\u0438 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043c\u0438\u0433\u0440\u0438\u0440\u0443\u044e\u0442). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0447\u044c\u044f \u0444\u0430\u043c\u0438\u043b\u0438\u044f (\u043a\u0430\u043a \u0431\u044b \u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f \u0441\u0442\u043e\u043b\u0431\u0435\u0446) \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u0430\u0441\u044c \u0441 \u0431\u0443\u043a\u0432\u044b <code>A<\/code>, \u0442\u043e \u0434\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (<code>old<\/code> \u2192 <code>new<\/code> \u0441\u0442\u043e\u043b\u0431\u0435\u0446) \u0443 \u0432\u0430\u0441 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043d\u043e\u0432\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443.<\/p><\/blockquote>\n<p>  <\/p>\n<h3 id=\"otkat-prilozheniya-1\">\u041e\u0442\u043a\u0430\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0<\/code> \u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <code>v2<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0428\u0430\u0433\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u043e\u0442\u043a\u0430\u0442\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0<\/code>.<\/li>\n<li>\u0432\u0435\u0440\u0441\u0438\u044f <code>1.0.0<\/code> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432 \u0411\u0414 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>surname<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u043a\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c<\/li>\n<\/ol>\n<p>  <\/p>\n<h3 id=\"izmeneniya-db\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f DB<\/h3>\n<p>  <\/p>\n<p>\u0411\u0414 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>last_name<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 Flyway:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">CREATE TABLE PERSON (     id BIGINT GENERATED BY DEFAULT AS IDENTITY,     first_name varchar(255) not null,     last_name varchar(255) not null );  insert into PERSON (first_name, last_name) values ('Dave', 'Syer');<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f <code>surname<\/code>.<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/strong> \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u041d\u0415\u041b\u042c\u0417\u042f \u0414\u041e\u0411\u0410\u0412\u041b\u042f\u0422\u042c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f NOT NULL \u0432 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446. \u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 JAR, \u0441\u0442\u0430\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435, \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0434\u0430\u0441\u0442 \u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 NULL. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0440\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f.<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"plaintext\">-- NOTE: This field can't have the NOT NULL constraint cause if you rollback, the old version won't know about this field -- and will always set it to NULL ALTER TABLE PERSON ADD surname varchar(255);  -- WE'RE ASSUMING THAT IT'S A FAST MIGRATION - OTHERWISE WE WOULD HAVE TO MIGRATE IN BATCHES UPDATE PERSON SET PERSON.surname = PERSON.last_name<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"izmeneniya-koda-2\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/h3>\n<p>  <\/p>\n<p>\u041c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u0432 <code>last_name<\/code>, \u0442\u0430\u043a \u0438 \u0432 <code>surname<\/code>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0447\u0438\u0442\u0430\u0435\u043c \u0438\u0437 <code>last_name<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e\u0442 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\/*  * Copyright 2012-2016 the original author or authors.  *  * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);  * you may not use this file except in compliance with the License.  * You may obtain a copy of the License at  *  *      http:\/\/www.apache.org\/licenses\/LICENSE-2.0  *  * Unless required by applicable law or agreed to in writing, software  * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  * See the License for the specific language governing permissions and  * limitations under the License.  *\/  package sample.flyway;  import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id;  @Entity public class Person {     @Id     @GeneratedValue     private Long id;     private String firstName;     private String lastName;     private String surname;      public String getFirstName() {         return this.firstName;     }      public void setFirstName(String firstName) {         this.firstName = firstName;     }      \/**      * Reading from the new column if it's set. If not the from the old one.      *      * When migrating from version 1.0.0 -&gt; 2.0.0 this can lead to a possibility that some data in      * the surname column is not up to date (during the migration process lastName could have been updated).      * In this case one can run yet another migration script after all applications have been deployed in the      * new version to ensure that the surname field is updated.      *      * However it makes sense since when looking at the migration from 2.0.0 -&gt; 3.0.0. In 3.0.0 we no longer      * have a notion of lastName at all - so we don't update that column. If we rollback from 3.0.0 -&gt; 2.0.0 if we      * would be reading from lastName, then we would have very old data (since not a single datum was inserted      * to lastName in version 3.0.0).      *\/     public String getSurname() {         return this.surname != null ? this.surname : this.lastName;     }      \/**      * Storing both FIRST_NAME and SURNAME entries      *\/     public void setSurname(String surname) {         this.lastName = surname;         this.surname = surname;     }      @Override     public String toString() {         return &quot;Person [firstName=&quot; + this.firstName + &quot;, lastName=&quot; + this.lastName + &quot;, surname=&quot; + this.surname                 + &quot;]&quot;;     } }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"shag-3-udalenie-last_name-iz-koda\">\u0428\u0430\u0433 3: \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 last_name \u0438\u0437 \u043a\u043e\u0434\u0430<\/h3>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: <code>3.0.0<\/code><\/p>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u0414\u0411:<code>v3<\/code><\/p>\n<p>  <\/p>\n<h3 id=\"kommentariy-3\">\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h3>\n<p>  <\/p>\n<p><em>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440.: \u041f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0431\u044b\u043b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0442\u0435\u043a\u0441\u0442 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0438\u0437 \u0448\u0430\u0433\u0430 2. \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0448\u0430\u0433\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>last_name<\/code>.<\/em><\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u044f \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0411\u0414. \u0422\u0430\u043a\u0436\u0435, \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0442\u043a\u0430\u0442\u0438\u043c JAR \u0438\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441\u0442\u0430\u0440\u044b\u0439 JAR, \u043e\u043d \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"otkat-prilozheniya-2\">\u041e\u0442\u043a\u0430\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 <code>3.0.0<\/code> \u0438 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 <code>v3<\/code>. \u0412\u0435\u0440\u0441\u0438\u044f <code>3.0.0<\/code> \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 <code>last_name<\/code>. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432 <code>surname<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u0430\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0428\u0430\u0433\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u043e\u0442\u043a\u0430\u0442\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0<\/code>.<\/li>\n<li>\u0432\u0435\u0440\u0441\u0438\u044f <code>2.0.0<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438 <code>last_name<\/code> \u0438 <code>surname<\/code>.<\/li>\n<li>\u0432\u0435\u0440\u0441\u0438\u044f <code>2.0.0<\/code> \u0432\u043e\u0437\u044c\u043c\u0451\u0442 <code>surname<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439, \u0430 \u0438\u043d\u0430\u0447\u0435 &#8212;<code>last_name<\/code><\/li>\n<\/ol>\n<p>  <\/p>\n<h3 id=\"izmeneniya-bd-2\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0411\u0414<\/h3>\n<p>  <\/p>\n<p>\u0412 \u0411\u0414 \u043d\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0441\u0442\u0430\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">-- WE'RE ASSUMING THAT IT'S A FAST MIGRATION - OTHERWISE WE WOULD HAVE TO MIGRATE IN BATCHES -- ALSO WE'RE NOT CHECKING IF WE'RE NOT OVERRIDING EXISTING ENTRIES. WE WOULD HAVE TO COMPARE -- ENTRY VERSIONS TO ENSURE THAT IF THERE IS ALREADY AN ENTRY WITH A HIGHER VERSION NUMBER -- WE WILL NOT OVERRIDE IT. UPDATE PERSON SET PERSON.surname = PERSON.last_name;  -- DROPPING THE NOT NULL CONSTRAINT; OTHERWISE YOU WILL TRY TO INSERT NULL VALUE OF THE LAST_NAME -- WITH A NOT_NULL CONSTRAINT. ALTER TABLE PERSON MODIFY COLUMN last_name varchar(255) NULL DEFAULT NULL;<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"izmeneniya-koda-3\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/h3>\n<p>  <\/p>\n<p><em>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440.: \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0438\u0437 \u0448\u0430\u0433\u0430 2. \u0412 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0448\u0430\u0433\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u0437 \u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c <code>last_name<\/code>.<\/em><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u0432 <code>last_name<\/code>, \u0442\u0430\u043a \u0438 \u0432 <code>surname.<\/code> \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u044b \u0447\u0438\u0442\u0430\u0435\u043c \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 <code>last_name<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\/*  * Copyright 2012-2016 the original author or authors.  *  * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);  * you may not use this file except in compliance with the License.  * You may obtain a copy of the License at  *  *      http:\/\/www.apache.org\/licenses\/LICENSE-2.0  *  * Unless required by applicable law or agreed to in writing, software  * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  * See the License for the specific language governing permissions and  * limitations under the License.  *\/  package sample.flyway;  import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id;  @Entity public class Person {     @Id     @GeneratedValue     private Long id;     private String firstName;     private String surname;      public String getFirstName() {         return this.firstName;     }      public void setFirstName(String firstName) {         this.firstName = firstName;     }      public String getSurname() {         return this.surname;     }      public void setSurname(String lastname) {         this.surname = lastname;     }      @Override     public String toString() {         return &quot;Person [firstName=&quot; + this.firstName + &quot;, surname=&quot; + this.surname                 + &quot;]&quot;;     } }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"shag-4-udalenie-last_name-iz-bd\">\u0428\u0430\u0433 4: \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 last_name \u0438\u0437 \u0411\u0414<\/h3>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: <code>4.0.0<\/code><\/p>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u044f \u0411\u0414: <code>v4<\/code><\/p>\n<p>  <\/p>\n<h3 id=\"kommentariy-4\">\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/h3>\n<p>  <\/p>\n<p>\u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u043e\u0434 \u0432\u0435\u0440\u0441\u0438\u0438 <code>3.0.0<\/code> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>last_name<\/code>, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043b\u043e\u0445\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0442\u043a\u0430\u0442\u0438\u043c\u0441\u044f \u0434\u043e <code>3.0.0<\/code> \u043f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<h3 id=\"logi-ispolneniya-skripta-1\">\u041b\u043e\u0433\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/h3>\n<p>  <\/p>\n<pre><code class=\"plaintext\">We will do it in the following way:  01) Run 1.0.0 02) Wait for the app (1.0.0) to boot 03) Generate a person by calling POST localhost:9991\/person to version 1.0.0 04) Run 2.0.0 05) Wait for the app (2.0.0) to boot 06) Generate a person by calling POST localhost:9991\/person to version 1.0.0 07) Generate a person by calling POST localhost:9992\/person to version 2.0.0 08) Kill app (1.0.0) 09) Run 3.0.0 10) Wait for the app (3.0.0) to boot 11) Generate a person by calling POST localhost:9992\/person to version 2.0.0 12) Generate a person by calling POST localhost:9993\/person to version 3.0.0 13) Kill app (3.0.0) 14) Run 4.0.0 15) Wait for the app (4.0.0) to boot 16) Generate a person by calling POST localhost:9993\/person to version 3.0.0 17) Generate a person by calling POST localhost:9994\/person to version 4.0.0  Starting app in version 1.0.0 Generate a person in version 1.0.0 Sending a post to 127.0.0.1:9991\/person. This is the response:  {&quot;firstName&quot;:&quot;52b6e125-4a5c-429b-a47a-ef18bbc639d2&quot;,&quot;lastName&quot;:&quot;52b6e125-4a5c-429b-a47a-ef18bbc639d2&quot;}  Starting app in version 2.0.0  Generate a person in version 1.0.0 Sending a post to 127.0.0.1:9991\/person. This is the response:  {&quot;firstName&quot;:&quot;e41ee756-4fa7-4737-b832-e28827a00deb&quot;,&quot;lastName&quot;:&quot;e41ee756-4fa7-4737-b832-e28827a00deb&quot;}  Generate a person in version 2.0.0 Sending a post to 127.0.0.1:9992\/person. This is the response:  {&quot;firstName&quot;:&quot;0c1240f5-649a-4bc5-8aa9-cff855f3927f&quot;,&quot;lastName&quot;:&quot;0c1240f5-649a-4bc5-8aa9-cff855f3927f&quot;,&quot;surname&quot;:&quot;0c1240f5-649a-4bc5-8aa9-cff855f3927f&quot;}  Killing app 1.0.0  Starting app in version 3.0.0  Generate a person in version 2.0.0 Sending a post to 127.0.0.1:9992\/person. This is the response: {&quot;firstName&quot;:&quot;74d84a9e-5f44-43b8-907c-148c6d26a71b&quot;,&quot;lastName&quot;:&quot;74d84a9e-5f44-43b8-907c-148c6d26a71b&quot;,&quot;surname&quot;:&quot;74d84a9e-5f44-43b8-907c-148c6d26a71b&quot;}  Generate a person in version 3.0.0 Sending a post to 127.0.0.1:9993\/person. This is the response: {&quot;firstName&quot;:&quot;c6564dbe-9ab5-40ae-9077-8ae6668d5862&quot;,&quot;surname&quot;:&quot;c6564dbe-9ab5-40ae-9077-8ae6668d5862&quot;}  Killing app 2.0.0  Starting app in version 4.0.0  Generate a person in version 3.0.0 Sending a post to 127.0.0.1:9993\/person. This is the response:  {&quot;firstName&quot;:&quot;cbe942fc-832e-45e9-a838-0fae25c10a51&quot;,&quot;surname&quot;:&quot;cbe942fc-832e-45e9-a838-0fae25c10a51&quot;}  Generate a person in version 4.0.0 Sending a post to 127.0.0.1:9994\/person. This is the response:  {&quot;firstName&quot;:&quot;ff6857ce-9c41-413a-863e-358e2719bf88&quot;,&quot;surname&quot;:&quot;ff6857ce-9c41-413a-863e-358e2719bf88&quot;}<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"izmeneniya-db-1\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0414\u0411<\/h3>\n<p>  <\/p>\n<p>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>v3<\/code> \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>last_name<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">-- REMOVE THE COLUMN ALTER TABLE PERSON DROP last_name;  -- ADD CONSTRAINTS UPDATE PERSON SET surname='' WHERE surname IS NULL; ALTER TABLE PERSON ALTER COLUMN surname VARCHAR NOT NULL;<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"izmeneniya-koda-4\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/h3>\n<p>  <\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442. <\/p>\n<p>  <\/p>\n<h3 id=\"vyvod\">\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>  <\/p>\n<p>\u041c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0445 \u0434\u0435\u043f\u043b\u043e\u0435\u0432. \u041d\u0438\u0436\u0435 \u0441\u0432\u043e\u0434\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0434\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>1.0.0<\/code> \u0441 <code>v1<\/code> \u0441\u0445\u0435\u043c\u044b \u0411\u0414 (\u0438\u043c\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 = <code>last_name<\/code>)<\/li>\n<li>\u0434\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.0.0,<\/code> \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 <code>last_name<\/code> \u0438 <code>surname<\/code>. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0438\u0442\u0430\u0435\u0442 \u0438\u0437 <code>last_name<\/code>. \u0411\u0414 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 <code>v2<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043a\u0430\u043a <code>last_name<\/code>, \u0442\u0430\u043a \u0438 <code>surname. surname<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043f\u0438\u0435\u0439 l<code>ast_name<\/code>. (\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u044d\u0442\u043e\u0442 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 not null)<\/li>\n<li>\u0434\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>3.0.0<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 <code>surname<\/code> \u0438 \u0447\u0438\u0442\u0430\u0435\u0442 \u0438\u0437 surname. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0411\u0414, \u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f <code>last_name<\/code> \u0432 <code>surname<\/code>. \u0422\u0430\u043a\u0436\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 <strong>NOT NULL<\/strong> \u0441\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0441 <code>last_name<\/code>. \u0411\u0414 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 <code>v3<\/code><\/li>\n<li>\u0434\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <code>4.0.0<\/code> \u2014 \u0432 \u043a\u043e\u0434\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0414\u0435\u043f\u043b\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 <code>v4<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 <code>last_name<\/code>. \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u0411\u0414.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443, \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0437\u0430\u0434, \u043d\u0435 \u043b\u043e\u043c\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \/ \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"kod\">\u041a\u043e\u0434<\/h3>\n<p>  <\/p>\n<p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/spring-cloud-samples\/zero-downtime-deployment\">Github<\/a>. \u041d\u0438\u0436\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"proekty\">\u041f\u0440\u043e\u0435\u043a\u0442\u044b<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0430\u043f\u043e\u043a.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u251c\u2500\u2500 boot-flyway-v1              - 1.0.0 version of the app with v1 of the schema \u251c\u2500\u2500 boot-flyway-v2              - 2.0.0 version of the app with v2 of the schema (backward-compatible - app can be rolled back) \u251c\u2500\u2500 boot-flyway-v2-bad          - 2.0.0.BAD version of the app with v2bad of the schema (backward-incompatible - app cannot be rolled back) \u251c\u2500\u2500 boot-flyway-v3              - 3.0.0 version of the app with v3 of the schema (app can be rolled back) \u2514\u2500\u2500 boot-flyway-v4              - 4.0.0 version of the app with v4 of the schema (app can be rolled back)<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"skripty\">\u0421\u043a\u0440\u0438\u043f\u0442\u044b<\/h3>\n<p>  <\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445 \u043d\u0438\u0436\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0438 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0411\u0414.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c <strong>\u0441\u043b\u0443\u0447\u0430\u0439 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438<\/strong>, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">.\/scripts\/scenario_backward_compatible.sh<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c <strong>\u0441\u043b\u0443\u0447\u0430\u0439 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438<\/strong>, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">.\/scripts\/scenario_backward_incompatible.sh<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"spring-boot-sample-flyway\">Spring Boot Sample Flyway<\/h3>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u0437\u044f\u0442\u044b \u0441 <code>Spring Boot Sample Flyway.<\/code><\/p>\n<p>  <\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 <code>http:\/\/localhost:8080\/flyway<\/code>, \u0442\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c H2 (\u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>http:\/\/localhost:8080\/h2-console<\/code>), \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (URL jdbc \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 <code>jdbc:h2:mem:testdb<\/code>).<\/p>\n<p>  <\/p>\n<h2 id=\"dopolnitelno\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/databaserefactoring.com\/\">Database Refactoring patterns<\/a><\/li>\n<li><a href=\"https:\/\/martinfowler.com\/bliki\/ContinuousDelivery.html\">Continuous Delivery<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"takzhe-chitayte-drugie-stati-v-nashem-bloge\">\u0422\u0430\u043a\u0436\u0435 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/480072\/\">Kubernetes: \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b?<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/481992\/\">Tekton Pipeline \u2014 Kubernetes-\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 pipelines<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/473578\/\">C\u0431\u043e\u0440\u043a\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f Nginx<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/473014\/\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Hashicorp Consul\u2019s Kubernetes \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/468779\/\">\u041a \u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441 ClickHouse \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 ClickHouse \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/470568\/\">Blue-Green Deployment \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Spring c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Nginx<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/481932\/\"> https:\/\/habr.com\/ru\/company\/nixys\/blog\/481932\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/481932\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hr\/vy\/qq\/hrvyqqi2mmitehw9vx_xklbofj8.png\">  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u0434\u0435\u043f\u043b\u043e\u0435. \u041c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430 \u043f\u0440\u043e\u0434\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u044d\u0442\u0430\u043f\u0430\u043c \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u044f (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440.: \u0434\u0430\u043b\u0435\u0435 \u2014 zero downtime<\/em>). \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043d\u0430\u0448\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-297373","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=297373"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297373\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}