{"id":445189,"date":"2025-01-16T21:00:52","date_gmt":"2025-01-16T21:00:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=445189"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-01-16T21:00:52","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=445189","title":{"rendered":"<span>Lite-\u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0442\u043e\u0440\u0430 Flyway \u0434\u043b\u044f PostgreSQL \u043d\u0430 TypeScript<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/h3>\n<p>\u0412 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <a href=\"https:\/\/documentation.red-gate.com\/fd\/installers-172490864.html\" rel=\"noopener noreferrer nofollow\">Flyway<\/a>, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0435\u0433\u043e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/versioned-migrations-273973333.html\" rel=\"noopener noreferrer nofollow\">Versioned migrations<\/a> \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/repeatable-migrations-273973335.html\" rel=\"noopener noreferrer nofollow\">Repeatable migrations<\/a> \u2014 \u044d\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Git.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/callbacks-275218509.html\" rel=\"noopener noreferrer nofollow\">Callbacks<\/a> \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0445\u0443\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 <code>beforeMigrate__init_types.sql<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u0438\u0433\u0440\u0430\u0442\u043e\u0440 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u042f \u0431\u044d\u043a\u0435\u043d\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 <code>Node.js<\/code> \u0438 \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434 <code>Node.js<\/code>, \u0432 \u0441\u043b\u0443\u0447\u0430\u0438 \u0441 <code>Flyway<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <code>Node.js<\/code>-\u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u2014 <a href=\"https:\/\/www.npmjs.com\/package\/node-flywaydb\" rel=\"noopener noreferrer nofollow\">node-flywaydb<\/a>.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438: \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043e\u043d \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e <code>Java<\/code>-\u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0435\u0451, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 <code>JVM<\/code> \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c <code>Docker<\/code>-\u043e\u0431\u0440\u0430\u0437\u044b, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u043d\u0438\u0445 <code>JVM<\/code>, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0437\u0430 \u0438 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u044c <code>CI\/CD<\/code>-\u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<h3>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h3>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>Node.js<\/code>-\u043c\u0438\u0433\u0440\u0430\u0442\u043e\u0440\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>db-migrate<\/code>, <code>umzug<\/code>, <code>pg-migrate<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0442\u043e\u0440\u044b, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432 <code>ORM<\/code>, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u0443\u044e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>prisma<\/code>, <code>typeorm<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u043a\u043b\u043e\u043d <code>Flyway<\/code> \u043d\u0430 <code>Node.js<\/code> \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (<code>PostgreSQL<\/code>).<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u0440\u0438\u043d\u044f\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <code>Flyway<\/code>, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>repeatable migrations<\/code> \u0438 <code>callbacks<\/code>, \u0438 \u043d\u0435 \u0445\u043e\u0447\u0443 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0438\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043b\u0435\u0433\u043a\u043e\u0433\u043e \u043a\u043b\u043e\u043d\u0430 <code>Flyway<\/code> \u043d\u0430 <code>Node.js<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <code>PostgreSQL<\/code>.<\/p>\n<h3>\u042d\u0442\u0430\u043f\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h3>\n<ol>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/versioned-migrations-273973333.html\" rel=\"noopener noreferrer nofollow\">Versioned migrations<\/a> \u2014 <strong>\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e<\/strong>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/repeatable-migrations-273973335.html\" rel=\"noopener noreferrer nofollow\">Repeatable migrations<\/a> \u2014 <strong>\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e<\/strong>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/callbacks-275218509.html\" rel=\"noopener noreferrer nofollow\">Callbacks<\/a> \u2014 <strong>\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e<\/strong>, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <code>versioned<\/code>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/flyway-schema-history-table-273973417.html\" rel=\"noopener noreferrer nofollow\">Flyway schema history table<\/a> \u2014 <strong>\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430<\/strong>, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <code>versioned<\/code> \u0438 <code>repeatable<\/code>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/migration-command-dry-runs-275218517.html\" rel=\"noopener noreferrer nofollow\">Migration Command Dry Runs<\/a> \u2014 <strong>\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e<\/strong>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/baseline-migrations-273973336.html\" rel=\"noopener noreferrer nofollow\">Baseline migrations<\/a> \u2014 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/baseline-migrations-273973336.html\" rel=\"noopener noreferrer nofollow\">Undo migrations<\/a> \u2014 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/script-migrations-273973390.html\" rel=\"noopener noreferrer nofollow\">Script migrations<\/a> \u2014 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/migration-transaction-handling-273973399.html\" rel=\"noopener noreferrer nofollow\">Migration transaction handling<\/a> \u2014 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/github.com\/flyway\/flyway\/blob\/main\/documentation\/Flyway%20CLI%20and%20API\/Concepts\/Migrations.md\" rel=\"noopener noreferrer nofollow\">\u0422\u0430\u043c<\/a> \u0443 \u043d\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u0432 \u043c\u043e\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>curl -fsSL https:\/\/raw.githubusercontent.com\/EndyKaufman\/pg-tools\/refs\/heads\/master\/docker-compose.yml -o docker-compose.yml docker compose up -d <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 PostgreSQL:<\/p>\n<pre><code>[+] Running 3\/3  \u2714 Network pg-tools_default              Created                         0.1s  \u2714 Volume \"pg-tools-postgre-sql-volume\"  Created                         0.0s  \u2714 Container pg-tools-postgre-sql        Started                         0.2s <\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>npx pg-flyway create --name=Init --version=1 echo \"CREATE TABLE \\\"User\\\"(id uuid NOT NULL DEFAULT uuid_generate_v4() constraint PK_USER primary key,email varchar(20));\" &gt; migrations\/V1__Init.sql <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>[2025-01-15T23:23:53.903] [INFO] create - Name: Init [2025-01-15T23:23:53.904] [INFO] create - Locations: migrations [2025-01-15T23:23:53.914] [INFO] create - Migration \"migrations\/V1__Init.sql\" was created successfully! <\/code><\/pre>\n<h4>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>npx pg-flyway migrate --database-url=postgres:\/\/pgtoolsusername:pgtoolspassword@localhost:5432\/pgtoolsdatabase?schema=public <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>[2025-01-16T00:08:39.052] [INFO] migrate - Locations: migrations [2025-01-16T00:08:39.053] [INFO] migrate - HistoryTable: __migrations [2025-01-16T00:08:39.053] [INFO] migrate - DatabaseUrl: postgres:\/\/pgtoolsusername:pgtoolspassword@localhost:5432\/pgtoolsdatabase?schema=public [2025-01-16T00:08:39.074] [INFO] migrate - Migrations: 1 <\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>npx pg-flyway info --database-url=postgres:\/\/pgtoolsusername:pgtoolspassword@localhost:5432\/pgtoolsdatabase?schema=public <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445:<\/p>\n<pre><code>[2025-01-16T09:15:34.007] [INFO] info - HistoryTable: __migrations [2025-01-16T09:15:34.008] [INFO] info - DatabaseUrl: postgres:\/\/pgtoolsusername:pgtoolspassword@localhost:5432\/pgtoolsdatabase?schema=public [2025-01-16T09:15:34.057] [INFO] info - Migrations: 1 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502  Category \u2502 Version \u2502 Description \u2502 Type \u2502        Installed On \u2502   State \u2502 Undoable \u2502 \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524 \u2502 Versioned \u2502       1 \u2502        Init \u2502  SQL \u2502 2025-01-15 20:08:39 \u2502 Success \u2502       No \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 <\/code><\/pre>\n<h4>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0414\u043b\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>docker compose down <\/code><\/pre>\n<h3>\u041f\u043b\u0430\u043d\u044b<\/h3>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Flyway<\/code> \u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u044b \u0432 <code>Typescript<\/code>-\u043a\u043e\u0434, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 <code>pull<\/code>-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430\u043c \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0431\u0430\u0433\u043e\u0432.<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/EndyKaufman\/pg-tools\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/EndyKaufman\/pg-tools<\/a> &#8212; \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.npmjs.com\/package\/pg-flyway\" rel=\"noopener noreferrer nofollow\">https:\/\/www.npmjs.com\/package\/pg-flyway<\/a> &#8212; \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u043d\u0430 NPM<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.npmjs.com\/package\/node-flywaydb\" rel=\"noopener noreferrer nofollow\">https:\/\/www.npmjs.com\/package\/node-flywaydb<\/a> &#8212; \u0412\u0440\u0430\u043f\u043f\u0435\u0440 \u0434\u043b\u044f <code>Flyway<\/code> (<code>Java<\/code>) \u043d\u0430 <code>NodeJS<\/code><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/flyway-concepts-271583830.html\" rel=\"noopener noreferrer nofollow\">https:\/\/documentation.red-gate.com\/flyway-concepts-271583830.html<\/a> &#8212; \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <code>Flyway<\/code><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/874028\/\"> https:\/\/habr.com\/ru\/articles\/874028\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/h3>\n<p>\u0412 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <a href=\"https:\/\/documentation.red-gate.com\/fd\/installers-172490864.html\" rel=\"noopener noreferrer nofollow\">Flyway<\/a>, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0435\u0433\u043e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/versioned-migrations-273973333.html\" rel=\"noopener noreferrer nofollow\">Versioned migrations<\/a> \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/repeatable-migrations-273973335.html\" rel=\"noopener noreferrer nofollow\">Repeatable migrations<\/a> \u2014 \u044d\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Git.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/callbacks-275218509.html\" rel=\"noopener noreferrer nofollow\">Callbacks<\/a> \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0445\u0443\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 <code>beforeMigrate__init_types.sql<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u0438\u0433\u0440\u0430\u0442\u043e\u0440 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u042f \u0431\u044d\u043a\u0435\u043d\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 <code>Node.js<\/code> \u0438 \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434 <code>Node.js<\/code>, \u0432 \u0441\u043b\u0443\u0447\u0430\u0438 \u0441 <code>Flyway<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <code>Node.js<\/code>-\u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u2014 <a href=\"https:\/\/www.npmjs.com\/package\/node-flywaydb\" rel=\"noopener noreferrer nofollow\">node-flywaydb<\/a>.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438: \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043e\u043d \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e <code>Java<\/code>-\u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0435\u0451, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 <code>JVM<\/code> \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c <code>Docker<\/code>-\u043e\u0431\u0440\u0430\u0437\u044b, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u043d\u0438\u0445 <code>JVM<\/code>, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0437\u0430 \u0438 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u044c <code>CI\/CD<\/code>-\u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<h3>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h3>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>Node.js<\/code>-\u043c\u0438\u0433\u0440\u0430\u0442\u043e\u0440\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>db-migrate<\/code>, <code>umzug<\/code>, <code>pg-migrate<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0442\u043e\u0440\u044b, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432 <code>ORM<\/code>, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u0443\u044e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>prisma<\/code>, <code>typeorm<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0451\u0433\u043a\u0438\u0439 \u043a\u043b\u043e\u043d <code>Flyway<\/code> \u043d\u0430 <code>Node.js<\/code> \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (<code>PostgreSQL<\/code>).<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u0440\u0438\u043d\u044f\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <code>Flyway<\/code>, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>repeatable migrations<\/code> \u0438 <code>callbacks<\/code>, \u0438 \u043d\u0435 \u0445\u043e\u0447\u0443 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0438\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043b\u0435\u0433\u043a\u043e\u0433\u043e \u043a\u043b\u043e\u043d\u0430 <code>Flyway<\/code> \u043d\u0430 <code>Node.js<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <code>PostgreSQL<\/code>.<\/p>\n<h3>\u042d\u0442\u0430\u043f\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h3>\n<ol>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/versioned-migrations-273973333.html\" rel=\"noopener noreferrer nofollow\">Versioned migrations<\/a> \u2014 <strong>\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e<\/strong>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/repeatable-migrations-273973335.html\" rel=\"noopener noreferrer nofollow\">Repeatable migrations<\/a> \u2014 <strong>\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e<\/strong>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/callbacks-275218509.html\" rel=\"noopener noreferrer nofollow\">Callbacks<\/a> \u2014 <strong>\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e<\/strong>, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <code>versioned<\/code>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/flyway-schema-history-table-273973417.html\" rel=\"noopener noreferrer nofollow\">Flyway schema history table<\/a> \u2014 <strong>\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430<\/strong>, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <code>versioned<\/code> \u0438 <code>repeatable<\/code>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/migration-command-dry-runs-275218517.html\" rel=\"noopener noreferrer nofollow\">Migration Command Dry Runs<\/a> \u2014 <strong>\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e<\/strong>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/baseline-migrations-273973336.html\" rel=\"noopener noreferrer nofollow\">Baseline migrations<\/a> \u2014 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/baseline-migrations-273973336.html\" rel=\"noopener noreferrer nofollow\">Undo migrations<\/a> \u2014 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/script-migrations-273973390.html\" rel=\"noopener noreferrer nofollow\">Script migrations<\/a> \u2014 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/fd\/migration-transaction-handling-273973399.html\" rel=\"noopener noreferrer nofollow\">Migration transaction handling<\/a> \u2014 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/github.com\/flyway\/flyway\/blob\/main\/documentation\/Flyway%20CLI%20and%20API\/Concepts\/Migrations.md\" rel=\"noopener noreferrer nofollow\">\u0422\u0430\u043c<\/a> \u0443 \u043d\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u0432 \u043c\u043e\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>curl -fsSL https:\/\/raw.githubusercontent.com\/EndyKaufman\/pg-tools\/refs\/heads\/master\/docker-compose.yml -o docker-compose.yml docker compose up -d <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 PostgreSQL:<\/p>\n<pre><code>[+] Running 3\/3  \u2714 Network pg-tools_default              Created                         0.1s  \u2714 Volume \"pg-tools-postgre-sql-volume\"  Created                         0.0s  \u2714 Container pg-tools-postgre-sql        Started                         0.2s <\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>npx pg-flyway create --name=Init --version=1 echo \"CREATE TABLE \\\"User\\\"(id uuid NOT NULL DEFAULT uuid_generate_v4() constraint PK_USER primary key,email varchar(20));\" &gt; migrations\/V1__Init.sql <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>[2025-01-15T23:23:53.903] [INFO] create - Name: Init [2025-01-15T23:23:53.904] [INFO] create - Locations: migrations [2025-01-15T23:23:53.914] [INFO] create - Migration \"migrations\/V1__Init.sql\" was created successfully! <\/code><\/pre>\n<h4>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>npx pg-flyway migrate --database-url=postgres:\/\/pgtoolsusername:pgtoolspassword@localhost:5432\/pgtoolsdatabase?schema=public <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code>[2025-01-16T00:08:39.052] [INFO] migrate - Locations: migrations [2025-01-16T00:08:39.053] [INFO] migrate - HistoryTable: __migrations [2025-01-16T00:08:39.053] [INFO] migrate - DatabaseUrl: postgres:\/\/pgtoolsusername:pgtoolspassword@localhost:5432\/pgtoolsdatabase?schema=public [2025-01-16T00:08:39.074] [INFO] migrate - Migrations: 1 <\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>npx pg-flyway info --database-url=postgres:\/\/pgtoolsusername:pgtoolspassword@localhost:5432\/pgtoolsdatabase?schema=public <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445:<\/p>\n<pre><code>[2025-01-16T09:15:34.007] [INFO] info - HistoryTable: __migrations [2025-01-16T09:15:34.008] [INFO] info - DatabaseUrl: postgres:\/\/pgtoolsusername:pgtoolspassword@localhost:5432\/pgtoolsdatabase?schema=public [2025-01-16T09:15:34.057] [INFO] info - Migrations: 1 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502  Category \u2502 Version \u2502 Description \u2502 Type \u2502        Installed On \u2502   State \u2502 Undoable \u2502 \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524 \u2502 Versioned \u2502       1 \u2502        Init \u2502  SQL \u2502 2025-01-15 20:08:39 \u2502 Success \u2502       No \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 <\/code><\/pre>\n<h4>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0414\u043b\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>docker compose down <\/code><\/pre>\n<h3>\u041f\u043b\u0430\u043d\u044b<\/h3>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Flyway<\/code> \u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u044b \u0432 <code>Typescript<\/code>-\u043a\u043e\u0434, \u0447\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 <code>pull<\/code>-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430\u043c \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0431\u0430\u0433\u043e\u0432.<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/EndyKaufman\/pg-tools\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/EndyKaufman\/pg-tools<\/a> &#8212; \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.npmjs.com\/package\/pg-flyway\" rel=\"noopener noreferrer nofollow\">https:\/\/www.npmjs.com\/package\/pg-flyway<\/a> &#8212; \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u043d\u0430 NPM<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.npmjs.com\/package\/node-flywaydb\" rel=\"noopener noreferrer nofollow\">https:\/\/www.npmjs.com\/package\/node-flywaydb<\/a> &#8212; \u0412\u0440\u0430\u043f\u043f\u0435\u0440 \u0434\u043b\u044f <code>Flyway<\/code> (<code>Java<\/code>) \u043d\u0430 <code>NodeJS<\/code><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/documentation.red-gate.com\/flyway-concepts-271583830.html\" rel=\"noopener noreferrer nofollow\">https:\/\/documentation.red-gate.com\/flyway-concepts-271583830.html<\/a> &#8212; \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <code>Flyway<\/code><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/874028\/\"> https:\/\/habr.com\/ru\/articles\/874028\/<\/a><br \/><\/br><\/br><\/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-445189","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445189","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=445189"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445189\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}