I ran Bitwarden's database back through Schemity, and SQL Server stopped the script at line 983: "Constraint name '#Cols_pkey' not permitted."
There is no table called #Cols. One of Bitwarden's 574 stored procedures creates it as a temporary table. Our import split the procedure…
Son Tran
14 commits
ST
Son Tran
@tbson
Software engineer loves to build things.
- Vietnam
- schemity.com
- github.com/tbson
- Joined October 2026
Commit activity
14 commits in the last 30 days
longest streak 2 dayscurrent 1
308 / 400 XP92 XP to maintainer
Today
Fri, Oct 23
Thu, Oct 22
I added one column to a customers table while testing a modular monolith schema, and two modules quietly started depending on each other.
The column was last_order_id, pointing at the ordering module's orders. Orders already pointed at customers. My pg_constraint query, the one…
Tue, Oct 20
I asked Postgres to turn a 0/1 integer flag into a boolean. It refused, and my USING clause was correct.
The column still had DEFAULT 1. PostgreSQL converts the default on its own, without your USING expression, and an integer default has no way to become a boolean. Hence…
A customer paid for Schemity and couldn't activate it. Their machine had internet, but Schemity's activation requests never reached our server. We still don't know why.
They emailed us their device ID. We activated the license on our end and sent back a PowerShell snippet to set…
Name a Postgres unique constraint email_unique on two tables and the second fails: "relation already exists". Check names are per table; anything backed by an index is per schema. Constraint naming, tested on 18.3, on the Schemity blog.…

schemity.comPostgreSQL Constraint Naming Convention: Which Pattern to Use, and How to Find the Names That Drifted - SchemitySchemity's guide to naming Postgres constraints and indexes: the pattern to pick, the 63-byte cut that makes two names collide, and a query for stale names.
Constraints are per-table, indexes are per-schema.
A UNIQUE constraint creates a matching index, so reusing the same name on a second table collides on the index → relation already exists.
Fix: name constraints per table, e.g. customers_email_unique, users_email_unique.
Mon, Oct 19
Name a Postgres unique constraint email_unique on two tables and the second fails: "relation already exists". Check names are per table; anything backed by an index is per schema. Constraint naming, tested on 18.3, on the Schemity blog.…

schemity.comPostgreSQL Constraint Naming Convention: Which Pattern to Use, and How to Find the Names That Drifted - SchemitySchemity's guide to naming Postgres constraints and indexes: the pattern to pick, the 63-byte cut that makes two names collide, and a query for stale names.
That's @tbson's root commit.