Adding constraint on a foreign key with node-pg-migration
node-pg-migration is a useful library. You can add a constraint of a foreign key with a simple references property on the column. For example, you have table client_session with publishable_key column and you want to reference publishable_key column in workspace table where it is not a primary key (just a unique key). The following usage … Continue reading “Adding constraint on a foreign key with node-pg-migration”