Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By DennisLiuCkv1.0.0In 1 marketplace
Converts Flyway SQL migration scripts' ALTER TABLE and CREATE INDEX statements into single-line OSC (Online Schema Change) entries. Your script must include a USE statement, since its database name becomes the first column of the output.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
Of the plugin's README
Chinese
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
將 Flyway SQL 遷移腳本轉換為 OSC (Online Schema Change) 格式,自動處理資料庫架構變更語句。
此技能專門用於將標準 SQL 遷移腳本轉換為 OSC 格式,支援:
USE 和 ALTER TABLE 包裝語法CREATE INDEX...ON table 轉換為 ADD INDEX... 格式NULL 轉換為 DEFAULT NULLOSC 格式使用 TAB 分隔的三欄結構:
{database}<TAB>{table}<TAB>{operations};
| 欄位 | 說明 |
|---|---|
| database | 資料庫名稱(從 USE 語句取得) |
| table | 資料表名稱(從 ALTER TABLE 取得) |
| operations | 以逗號分隔的操作列表,結尾加分號 |
| SQL 語法 | OSC 格式 |
|---|---|
USE db; | 移除(db 放入第一欄) |
ALTER TABLE tbl | 移除(tbl 放入第二欄) |
NULL | DEFAULT NULL |
CREATE INDEX idx ON tbl (col) | ADD INDEX idx (col) |
varchar | VARCHAR |
| 多個操作 | 以逗號連接,無空格 |
"將 V1.0__alter_table.sql 轉換為 OSC 格式"
"OSC 轉換"
"幫我產生 osc.txt"
Claude 會在以下情況自動使用此技能:
src/main/resources/db/migration/
├── V1.0__init.sql
├── V1.1__alter_table.sql
└── V2.0__add_index.sql
src/main/resources/db/osc/
└── osc-{YYYYMMDD}.txt # 例如:osc-20251212.txt
| 項目 | 規格 |
|---|---|
| 編碼 | UTF-8(無 BOM) |
| 換行 | LF (\n) |
| 欄位分隔 | TAB (\t) |
| 操作分隔 | 逗號 (,),無空格 |
| 行結尾 | 分號 (;) |
V1.0__alter_my_table.sqlUSE mydb;
ALTER TABLE MY_TABLE
ADD COLUMN NEW_COL bigint(20) NULL AFTER EXISTING_COL;
CREATE INDEX MY_TABLE_NEW_COL_IDX ON MY_TABLE (NEW_COL);
osc-20251212.txtmydb MY_TABLE ADD COLUMN NEW_COL BIGINT(20) DEFAULT NULL AFTER EXISTING_COL,ADD INDEX MY_TABLE_NEW_COL_IDX (NEW_COL);
轉換完成後,技能會提供以下摘要:
✓ 轉換完成
來源: V1.0__alter_my_table.sql
輸出: src/main/resources/db/osc/osc-20251212.txt
影響資料表: MY_TABLE
操作統計:
- ADD COLUMN: 1
- ADD INDEX: 1
- MODIFY COLUMN: 0
"將 migration 資料夾中的所有 SQL 檔案轉換為 OSC"
"轉換為 OSC 格式,輸出至 osc-20251225.txt"
"檢查 osc.txt 格式是否正確"
ALTER TABLE 和 CREATE INDEX 語句USE 語句指定資料庫名稱ALTER TABLE 或 CREATE INDEX...ON 語句中提取Dennis Liu ([email protected])
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub dennisliuck/claude-plugin-marketplace --plugin sql-to-oscPlugins from other owners that cover similar ground