{"id":233,"date":"2025-11-26T10:55:18","date_gmt":"2025-11-26T02:55:18","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=233"},"modified":"2025-11-26T10:55:18","modified_gmt":"2025-11-26T02:55:18","slug":"%e6%95%b0%e6%8d%ae%e5%ba%93-ci-cd-%e5%8a%9f%e8%83%bd%ef%bc%8c%e4%bd%a0%e7%94%a8%e6%98%8e%e7%99%bd%e4%ba%86%e5%90%97%ef%bc%9f%e7%bb%88%e6%9e%81%e8%af%a6%e8%a7%a3-%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/11\/26\/%e6%95%b0%e6%8d%ae%e5%ba%93-ci-cd-%e5%8a%9f%e8%83%bd%ef%bc%8c%e4%bd%a0%e7%94%a8%e6%98%8e%e7%99%bd%e4%ba%86%e5%90%97%ef%bc%9f%e7%bb%88%e6%9e%81%e8%af%a6%e8%a7%a3-%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97\/","title":{"rendered":"\u6570\u636e\u5e93 CI\/CD \u529f\u80fd\uff0c\u4f60\u7528\u660e\u767d\u4e86\u5417\uff1f\u7ec8\u6781\u8be6\u89e3 + \u5b9e\u6218\u6307\u5357"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u2b50 \u4e00\u3001\u4ec0\u4e48\u662f\u6570\u636e\u5e93 CI\/CD\uff1f<\/h1>\n\n\n\n<p>\u5f88\u591a\u4eba\u505a CI\/CD \u53ea\u4f1a\u5904\u7406\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ee3\u7801\u6253\u5305<\/li>\n\n\n\n<li>\u8fd0\u884c\u5355\u5143\u6d4b\u8bd5<\/li>\n\n\n\n<li>\u81ea\u52a8\u90e8\u7f72\u5e94\u7528<\/li>\n<\/ul>\n\n\n\n<p>\u4f46<strong>\u6570\u636e\u5e93<\/strong>\u5f80\u5f80\u88ab\u5ffd\u7565\u3002<\/p>\n\n\n\n<p>\u26a0 <strong>\u95ee\u9898\u662f\uff1a\u6570\u636e\u5e93\u4e0d\u662f\u4ee3\u7801\uff0c\u4e0d\u80fd\u76f4\u63a5\u8986\u76d6\u66f4\u65b0\uff01<\/strong><\/p>\n\n\n\n<p>\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8868\u7ed3\u6784\uff08schema\uff09<\/li>\n\n\n\n<li>\u7d22\u5f15<\/li>\n\n\n\n<li>\u89c6\u56fe<\/li>\n\n\n\n<li>\u5b58\u50a8\u8fc7\u7a0b<\/li>\n\n\n\n<li>\u521d\u59cb\u6570\u636e\u3001\u914d\u7f6e\u6570\u636e<\/li>\n<\/ul>\n\n\n\n<p>\u6240\u4ee5\u5fc5\u987b\u6709\u4e13\u95e8\u7684\u6570\u636e\u5e93 CI\/CD \u65b9\u6848\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u2b50 \u4e8c\u3001\u4e3a\u4ec0\u4e48\u6570\u636e\u5e93 CI\/CD \u5fc5\u987b\u505a\uff1f<\/h1>\n\n\n\n<p>\u4f20\u7edf\u624b\u52a8\u6539\u6570\u636e\u5e93\u7684\u65b9\u5f0f\u6709\u4e09\u4e2a\u5de8\u5927\u98ce\u9669\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u274c \u7ebf\u4e0a\u4e0e\u6d4b\u8bd5\u5e93\u7ed3\u6784\u4e0d\u4e00\u81f4<\/h3>\n\n\n\n<p>\u9020\u6210\u90e8\u7f72\u5931\u8d25\u3001\u8fd0\u884c\u5f02\u5e38\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u274c DBA \u4e0e\u5f00\u53d1\u6539\u91cd\u590d\u3001\u9057\u6f0f<\/h3>\n\n\n\n<p>\u591a\u73af\u5883\u624b\u5de5\u7ef4\u62a4\uff0c\u6781\u6613\u51fa\u9519\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u274c \u65e0\u6cd5\u56de\u6eda<\/h3>\n\n\n\n<p>\u624b\u52a8 SQL \u4fee\u6539\u4e00\u65e6\u9519\u4e86\uff0c\u57fa\u672c\u7b49\u4e8e\u4e8b\u6545\u3002<\/p>\n\n\n\n<p><strong>\u6570\u636e\u5e93 CI\/CD \u7684\u6838\u5fc3\uff0c\u5c31\u662f\u89e3\u51b3\u4ee5\u4e0a\u5168\u90e8\u95ee\u9898\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u2b50 \u4e09\u3001\u6570\u636e\u5e93 CI\/CD \u7684\u6838\u5fc3\u7ec4\u6210\uff08\u5fc5\u987b\u7406\u89e3\uff01\uff09<\/h1>\n\n\n\n<p>\u4e00\u5957\u5b8c\u6574\u7684\u6570\u636e\u5e93 CI\/CD \u5305\u542b 4 \u4e2a\u90e8\u5206\uff1a<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u2460 \u7248\u672c\u5316\u7ba1\u7406\uff08Versioning\uff09\u2014\u2014\u5fc5\u987b\u7528\u5de5\u5177\u7ba1\u7406 schema<\/strong><\/h2>\n\n\n\n<p>\u5e38\u7528\u5de5\u5177\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u5de5\u5177<\/th><th>\u652f\u6301 DB<\/th><th>\u4f18\u52bf<\/th><\/tr><\/thead><tbody><tr><td><strong>Flyway<\/strong><\/td><td>MySQL\/PostgreSQL\/Oracle\/SQLServer \u7b49<\/td><td>\u8f7b\u91cf\u7ea7\u3001\u6700\u6613\u7528\u3001\u7528 SQL \u811a\u672c<\/td><\/tr><tr><td><strong>Liquibase<\/strong><\/td><td>\u5168\u5e73\u53f0<\/td><td>\u5f3a\u5927\u3001\u652f\u6301 XML\/YAML \u53d8\u66f4<\/td><\/tr><tr><td><strong>Alembic<\/strong><\/td><td>MySQL\/PostgreSQL<\/td><td>Python \u9879\u76ee\u9996\u9009\uff0cSQLAlchemy \u5b98\u65b9\u63a8\u8350<\/td><\/tr><tr><td><strong>EF Migration<\/strong><\/td><td>MSSQL<\/td><td>.NET \u5185\u7f6e\u8fc1\u79fb<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u8fd9\u662f\u6570\u636e\u5e93 CI\/CD \u7684\u57fa\u7840\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u2461 \u811a\u672c\u5ba1\u6838\u673a\u5236\uff08Review\uff09<\/strong><\/h2>\n\n\n\n<p>\u63a8\u9001 SQL\/DDL \u524d\u5fc5\u987b\u7ecf\u8fc7\u81ea\u52a8\u5ba1\u6838\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8868\u5b57\u6bb5\u7c7b\u578b<\/li>\n\n\n\n<li>\u7d22\u5f15\u547d\u540d\u89c4\u8303<\/li>\n\n\n\n<li>\u7981\u6b62\u5168\u8868\u626b\u63cf<\/li>\n\n\n\n<li>\u7981\u6b62\u9690\u5f0f\u8f6c\u6362<\/li>\n\n\n\n<li>\u7981\u6b62 DROP \u6574\u5f20\u8868<\/li>\n\n\n\n<li>\u6570\u636e\u8fc1\u79fb\u5fc5\u987b\u5206\u6279\u6267\u884c<\/li>\n<\/ul>\n\n\n\n<p>\u5e38\u7528\u5de5\u5177\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>SQLFluff<\/strong>\uff08SQL lint\uff09<\/li>\n\n\n\n<li><strong>PingCAP TiDB Linter<\/strong><\/li>\n\n\n\n<li><strong>\u963f\u91cc\u4e91 DMS<\/strong><\/li>\n\n\n\n<li><strong>\u9cb8\u667a DBA<\/strong>\uff08\u56fd\u4ea7\u975e\u5e38\u6210\u719f\uff09<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u2462 \u81ea\u52a8\u6784\u5efa\/\u6d4b\u8bd5\uff08CI\uff09<\/strong><\/h2>\n\n\n\n<p>\u6570\u636e\u5e93\u6d4b\u8bd5\u5305\u542b\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2714 Schema \u5355\u5143\u6d4b\u8bd5<\/h3>\n\n\n\n<p>\u662f\u5426\u80fd\u6267\u884c\u6210\u529f\uff1f\u5b57\u6bb5\u7c7b\u578b\u662f\u5426\u6b63\u786e\uff1f<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2714 Migration \u51b2\u7a81\u68c0\u6d4b<\/h3>\n\n\n\n<p>\u591a\u4eba\u5f00\u53d1\u662f\u5426\u5199\u4e86\u51b2\u7a81\u8fc1\u79fb\uff1f<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2714 \u6570\u636e\u4e00\u81f4\u6027\u68c0\u6d4b<\/h3>\n\n\n\n<p>\u5916\u952e\u662f\u5426\u65ad\u88c2\uff1f\u7d22\u5f15\u662f\u5426\u4e22\u5931\uff1f<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2714 \u4f9d\u8d56\u5e94\u7528\u6d4b\u8bd5<\/h3>\n\n\n\n<p>\u8fc1\u79fb\u540e\u5e94\u7528\u662f\u5426\u80fd\u6b63\u5e38\u542f\u52a8\uff1f<\/p>\n\n\n\n<p>\u5728 CI \u5de5\u5177\u4e2d\u8fd0\u884c\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GitHub Actions<\/li>\n\n\n\n<li>GitLab CI<\/li>\n\n\n\n<li>Jenkins<\/li>\n\n\n\n<li>Azure DevOps<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u2463 \u81ea\u52a8\u90e8\u7f72\uff08CD\uff09<\/strong><\/h2>\n\n\n\n<p>\u5c06\u5ba1\u6838\u901a\u8fc7\u7684 migration \u81ea\u52a8\u6267\u884c\u5230\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6d4b\u8bd5\u5e93<\/li>\n\n\n\n<li>\u7070\u5ea6\u5e93<\/li>\n\n\n\n<li>\u751f\u4ea7\u5e93<\/li>\n<\/ul>\n\n\n\n<p>\u9700\u8981\u652f\u6301\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5e42\u7b49\u6267\u884c<\/li>\n\n\n\n<li>\u81ea\u52a8\u5907\u4efd\u5feb\u7167<\/li>\n\n\n\n<li>\u5931\u8d25\u81ea\u52a8\u56de\u6eda<\/li>\n\n\n\n<li>\u6709\u5e8f\u4f9d\u8d56\uff08\u6309\u7248\u672c\u9012\u589e\u6267\u884c\uff09<\/li>\n<\/ul>\n\n\n\n<p>\u6267\u884c\u65b9\u5f0f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Flyway migrate<\/li>\n\n\n\n<li>Liquibase update<\/li>\n\n\n\n<li>Alembic upgrade<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u2b50 \u56db\u3001\u6570\u636e\u5e93 CI\/CD \u5b9e\u6218\u6d41\u7a0b\uff08\u5f3a\u70c8\u5efa\u8bae\u6536\u85cf\uff09<\/h1>\n\n\n\n<p>\u8fd9\u662f\u6700\u63a8\u8350\u3001\u6700\u5e38\u89c1\u7684\u4e00\u5957\u6d41\u7a0b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udd25 <strong>Step 1\uff1a\u5f00\u53d1\u8005\u521b\u5efa Migration\uff08\u7248\u672c\u811a\u672c\uff09<\/strong><\/h1>\n\n\n\n<p>\u4ee5 Flyway \u4e3a\u4f8b\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nV20251126__add_user_table.sql\n\n<\/pre><\/div>\n\n\n<p>\u793a\u4f8b\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nCREATE TABLE user (\n    id BIGINT PRIMARY KEY AUTO_INCREMENT,\n    username VARCHAR(255) NOT NULL UNIQUE,\n    email VARCHAR(255),\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\n<\/pre><\/div>\n\n\n<p>\u63d0\u4ea4\u5230\u4ee3\u7801\u4ed3\u5e93\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udd25 <strong>Step 2\uff1a\u4ee3\u7801\u63d0\u4ea4\u89e6\u53d1 CI\uff08\u81ea\u52a8\u68c0\u67e5 SQL\uff09<\/strong><\/h1>\n\n\n\n<p>CI \u6267\u884c\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>SQL \u8bed\u6cd5\u68c0\u67e5\uff08SQL Lint\uff09<\/li>\n\n\n\n<li>\u68c0\u67e5\u662f\u5426\u8fdd\u53cd\u7ea6\u675f\u89c4\u5219\uff08\u5982\u7981\u6b62 SELECT *\uff09<\/li>\n\n\n\n<li>\u68c0\u67e5\u662f\u5426\u53ef\u80fd\u5bfc\u81f4\u9501\u8868\u3001\u5168\u8868\u626b\u63cf<\/li>\n\n\n\n<li>\u6267\u884c migration \u5230\u201c\u6d4b\u8bd5\u6570\u636e\u5e93\u955c\u50cf\u201d<\/li>\n<\/ol>\n\n\n\n<p>\u5e38\u89c1 CI \u914d\u7f6e\uff08GitHub Actions\uff09\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nname: DB-CI\non:\n  push:\n    paths:\n      - db\/migration\/**\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\/checkout@v3\n\n      - name: Start MySQL\n        run: docker run -d -p 3306:3306 mysql:8\n\n      - name: Run Flyway\n        run: flyway migrate\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udd25 <strong>Step 3\uff1a\u81ea\u52a8\u5316\u6d4b\u8bd5\uff08\u96c6\u6210\u5e94\u7528\uff09<\/strong><\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Migration \u6267\u884c\u6210\u529f<\/li>\n\n\n\n<li>\u5e94\u7528\u542f\u52a8\u662f\u5426\u6b63\u5e38<\/li>\n\n\n\n<li>API \u80fd\u4e0d\u80fd\u6b63\u5e38\u8bbf\u95ee<\/li>\n\n\n\n<li>\u5355\u5143\u6d4b\u8bd5\u662f\u5426\u901a\u8fc7<\/li>\n<\/ul>\n\n\n\n<p>\u5982\u679c\u4e0d\u901a\u8fc7 \u2192 \u76f4\u63a5\u963b\u6b62\u5408\u5e76\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udd25 <strong>Step 4\uff1a\u81ea\u52a8 CD\uff08\u90e8\u7f72\u5230\u591a\u73af\u5883\uff09<\/strong><\/h1>\n\n\n\n<p>\u793a\u4f8b\u751f\u4ea7\u90e8\u7f72\u547d\u4ee4\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nflyway -url=jdbc:mysql:\/\/prod -user=root -password=xxx migrate\n\n<\/pre><\/div>\n\n\n<p>\ud83d\udca1\u53ef\u4ee5\u52a0\u5165\u81ea\u52a8\u5907\u4efd\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmysqldump &gt; backup_$(date).sql\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udd25 <strong>Step 5\uff1a\u5931\u8d25\u81ea\u52a8\u56de\u6eda\uff08\u53ef\u9009\uff09<\/strong><\/h1>\n\n\n\n<p>Flyway \u652f\u6301\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nflyway undo\n\n<\/pre><\/div>\n\n\n<p>Liquibase \u652f\u6301\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nliquibase rollbackCount 1\n\n<\/pre><\/div>\n\n\n<p>\u751f\u4ea7\u4e8b\u6545\u65f6\u975e\u5e38\u5173\u952e\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u2b50 \u4e94\u3001\u5e38\u89c1\u6570\u636e\u5e93 CI\/CD \u65b9\u6848\uff08\u6309\u6280\u672f\u6808\u7ed9\u4f60\u63a8\u8350\uff09<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Python \u9879\u76ee\uff08Django \/ Flask \/ FastAPI\uff09<\/strong><\/h2>\n\n\n\n<p><strong>\u6700\u4f73\u65b9\u6848\uff1aAlembic + GitHub Actions\/GitLab CI<\/strong><\/p>\n\n\n\n<p>\u7279\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Python \u539f\u751f<\/li>\n\n\n\n<li>\u81ea\u52a8\u5bf9\u6bd4 ORM \u548c\u6570\u636e\u5e93\u5dee\u5f02<\/li>\n\n\n\n<li>\u751f\u6210 migration \u975e\u5e38\u65b9\u4fbf<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Java \/ Spring Boot \u9879\u76ee<\/strong><\/h2>\n\n\n\n<p><strong>\u6700\u4f73\u65b9\u6848\uff1aFlyway\uff08\u6700\u8f7b\u91cf\uff09 \u6216 Liquibase\uff08\u6700\u7a33\u5b9a\uff09<\/strong><\/p>\n\n\n\n<p>Spring Boot \u5185\u7f6e\u652f\u6301\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nspring.flyway.enabled=true\nspring.flyway.locations=classpath:db\/migration\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5927\u5382\u7ea7\u5e73\u53f0\uff08\u5f3a\u9700\u6c42\uff09<\/strong><\/h2>\n\n\n\n<p>\u63a8\u8350\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u963f\u91cc\u4e91 DMS<\/li>\n\n\n\n<li>WhaleGo\uff08\u9cb8\u667a\uff09<\/li>\n\n\n\n<li>Archery<\/li>\n\n\n\n<li>Bytebase\uff08\u4e13\u4e1a\u6570\u636e\u5e93 CI\/CD \u5e73\u53f0\uff09<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u2b50 \u516d\u3001\u6570\u636e\u5e93 CI\/CD \u7684 5 \u5927\u6700\u4f73\u5b9e\u8df5\uff08\u5b9e\u6218\u7ecf\u9a8c\u603b\u7ed3\uff09<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2460 Migration \u4e00\u65e6\u53d1\u5e03\uff0c\u7edd\u4e0d\u80fd\u4fee\u6539\uff0c\u53ea\u80fd\u65b0\u5efa\u4e00\u4e2a<\/strong><\/h3>\n\n\n\n<p>\u9075\u5faa\uff1a<\/p>\n\n\n\n<p>\u2714 \u201c\u5411\u524d\u8fc1\u79fb\u201d<br>\u2714 \u201c\u4e0d\u53ef\u53d8\u811a\u672c\u201d<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2461 \u5927\u6279\u91cf\u6570\u636e\u66f4\u65b0\u5fc5\u987b\u5206\u6279\uff08Batch\uff09<\/strong><\/h3>\n\n\n\n<p>\u907f\u514d\u9501\u8868 + IO \u98ce\u66b4\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2462 \u7981\u6b62\u7ebf\u4e0a DROP COLUMN \/ DROP TABLE<\/strong><\/h3>\n\n\n\n<p>\u5fc5\u987b\u901a\u8fc7\u201c\u5f03\u7528\u6807\u8bb0 \u2192 \u5ef6\u8fdf\u5220\u9664\u201d\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2463 \u6240\u6709\u8868\u5fc5\u987b\u6709 primary key<\/strong><\/h3>\n\n\n\n<p>\u6ca1\u6709\u4e3b\u952e\u4f1a\u5bfc\u81f4\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u590d\u5236\u5931\u8d25<\/li>\n\n\n\n<li>CDC \u65e0\u6cd5\u540c\u6b65<\/li>\n\n\n\n<li>\u5907\u4efd\u6062\u590d\u56f0\u96be<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2464 CI \u5fc5\u987b\u6709\u201c\u6a21\u62df\u751f\u4ea7\u5e93\u201d\u73af\u5883<\/strong><\/h3>\n\n\n\n<p>\u7528\u4e8e\u63d0\u524d\u53d1\u73b0\u95ee\u9898\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u2b50 \u4e03\u3001\u603b\u7ed3\uff1a\u4ec0\u4e48\u624d\u662f\u201c\u771f\u6b63\u4f1a\u7528\u6570\u636e\u5e93 CI\/CD\u201d\uff1f<\/h1>\n\n\n\n<p>\u4f60\u5fc5\u987b\u505a\u5230\uff1a<\/p>\n\n\n\n<p>\u2714 \u6240\u6709 schema \u53d8\u66f4\u90fd\u6709\u7248\u672c<br>\u2714 \u6240\u6709 SQL \u90fd\u7ecf\u8fc7\u5ba1\u6838<br>\u2714 \u6240\u6709 migration \u5728 CI \u6d4b\u8bd5\u8fc7<br>\u2714 \u6240\u6709\u90e8\u7f72\u90fd\u81ea\u52a8\u6267\u884c<br>\u2714 \u6240\u6709\u9519\u8bef\u5747\u53ef\u56de\u6eda<\/p>\n\n\n\n<p><strong>\u8fd9\u624d\u662f\u771f\u6b63\u7684\u6570\u636e\u5e93 CI\/CD\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u6267\u884c\u51e0\u6761 SQL\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u5982\u679c\u4f60\u9700\u8981\uff0c\u6211\u8fd8\u80fd\u4e3a\u4f60\u751f\u6210\uff1a<\/h1>\n\n\n\n<p>\ud83d\udccc \u6570\u636e\u5e93 CI\/CD PPT\uff08\u53ef\u76f4\u63a5\u7528\u6765\u505a\u6c47\u62a5\uff09<br>\ud83d\udccc \u9488\u5bf9 MySQL \/ PostgreSQL \/ SQLServer \u6df1\u5ea6\u7248\u6559\u7a0b<br>\ud83d\udccc \u5efa\u4e00\u4e2a\u53ef\u8fd0\u884c\u7684 GitHub Demo \u4ed3\u5e93<br>\ud83d\udccc \u4e3a\u4f60\u7684\u9879\u76ee\u5199\u4e00\u5957\u5b8c\u6574\u7684 CI\/CD \u811a\u672c\uff08Flyway \/ Alembic\uff09<\/p>\n\n\n\n<p>\u9700\u8981\u54ea\u4e2a\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2b50 \u4e00\u3001\u4ec0\u4e48\u662f\u6570\u636e\u5e93 CI\/CD\uff1f \u5f88\u591a\u4eba\u505a CI\/CD \u53ea\u4f1a\u5904\u7406\uff1a \u4f46\u6570\u636e\u5e93\u5f80&#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/11\/26\/%e6%95%b0%e6%8d%ae%e5%ba%93-ci-cd-%e5%8a%9f%e8%83%bd%ef%bc%8c%e4%bd%a0%e7%94%a8%e6%98%8e%e7%99%bd%e4%ba%86%e5%90%97%ef%bc%9f%e7%bb%88%e6%9e%81%e8%af%a6%e8%a7%a3-%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-ruby"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":234,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/233\/revisions\/234"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}