You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>sqldef is a <ahref="https://github.com/k0kubun/sqldef">CLI tool</a>, <ahref="https://github.com/sqldef/sqldef.github.io">webasm library</a>, and <ahref="https://github.com/sqldef/node-sqldef">nodejs tool/library</a> for diffing SQL schema. You can use it to manage migration of PostgreSQL and MySQL databases, using regular SQL DDL.</p>
51
+
48
52
<h2>Demo</h2>
49
-
<p>You can diff these 2 schemas:</p>
50
-
<preid="error"></pre>
53
+
<p>You can generate DDLs to update the DB schema:</p>
54
+
55
+
<div>
56
+
<selectid="dbType">
57
+
<optionvalue="mysql">MySQL</option>
58
+
<optionvalue="postgres">PostgreSQL</option>
59
+
</select>
60
+
<buttonid="buttonDiff">DIFF</button>
61
+
</div>
62
+
63
+
<preid="output"></pre>
64
+
<preid="error"></pre>
65
+
66
+
<h4class="schema-header">Current schema</h4>
51
67
<textareaid="inputA" rows="10">
52
68
CREATE TABLE user (
53
69
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
54
70
name VARCHAR(128) DEFAULT 'konsumer'
55
71
) Engine=InnoDB DEFAULT CHARSET=utf8mb4;
56
72
</textarea>
57
73
74
+
<h4class="schema-header">New schema</h4>
58
75
<textareaid="inputB" rows="10">
59
76
CREATE TABLE user (
60
77
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
0 commit comments