Compare two database structures in the JSON format shown below and generate PostgreSQL migration SQL. Review the generated statements and test them on a disposable database before use.
Paste the old and new database structures as JSON. The tool compares them and generates PostgreSQL ALTER statements. DROP operations can delete data; inspect the script before running it.
{
"tables": {
"users": {
"columns": {
"id": {
"type": "SERIAL",
"primary_key": true
},
"name": {
"type": "VARCHAR(255)",
"nullable": false
}
},
"indexes": ["name"]
}
}
}
SERIAL, BIGSERIALINTEGER, BIGINTDECIMAL(p,s), NUMERIC(p,s)REAL, DOUBLE PRECISIONVARCHAR(n), CHAR(n)TEXTUUIDDATETIME, TIMESTAMPTIMESTAMPTZBOOLEANJSON, JSONBBYTEAFree tools for analysts and developers