webapplog.com - webapplog [tech blog] – Book author Azat Mardan writes about apps, startups and technology

Example domain paragraphs

Book author Azat Mardan writes about apps, startups and technology

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 with object: schema, name, won’t work:

It looks like node-pg-migration is not smart enough to add the column/field name like it does for primary keys. You can use a string ( seam.table2(col) ) as the references value, not an object, or just use raw SQL to bypass node-pg-migration behavior, e.g.,

Links to webapplog.com (6)