Ddldump
Dump a clean version of the DDLs of your tables, so you can version them.
Install / Use
/learn @percolate/DdldumpREADME
ddldump
Dump and version the DDLs of your tables, while cleaning the dumps of all the varying stuff, like MySQL's AUTOINCs, that would make it hard to version and check for differences during continuous integration.
Usage
ddldump <dsn> [table] > table.sql
Example
Dump all the table DDLs of the MySQL database cooldb:
ddldump mysql://localhost/cooldb > cooldb.sql
Dump the specific DDL of the awesome PostgreSQL table.
(requires postgresql-client, matching the server version, to be installed):
ddldump postgresql://localhost/mydb awesome > awesome.sql
Compare your dump with what's actually in your database:
$ ddldump --diff=cooldb.sql mysql://localhost/cooldb
--- mysql
+++ cooldb.sql
@@ -14,7 +14,7 @@
-- Create syntax for TABLE 'user'
CREATE TABLE `user` (
- `id` bigint(20) unsigned COMMENT 'The user ID',
+ `id` bigint(20) unsigned NOT NULL COMMENT 'The user ID',
`name` varchar(64) NOT NULL COMMENT 'The user name',
PRIMARY KEY (`id`)
Install
pip install ddldump
Upload a new version
- Set a new version in
ddldump/constants.py - Open a PR, get it reviewed, get it merged
git tag <version>git push --tagsmake release
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
