mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
6b61bcf123
refs https://github.com/TryGhost/Ghost/issues/12567 - Introduced here @@UNIQUE_CONSTRAINTS@@ notation allows to create unique contraints over multiple database fields. This will be needed to change posts' table unique constraint from `slug` to `slug+type`. - The notation is equivalent to SQL's: UNIQUE(column_name1,column_name2) - Example use in schema: posts: { slug: {type: 'string', maxlength: 191, nullable: false}, type: {type: 'string', maxlength: 50, nullable: false, defaultTo: 'post', validations: {isIn: [['post', 'page']]}}, '@@UNIQUES@@': [ ['slug', 'type'] ] } |
||
---|---|---|
.. | ||
bulk-operations.js | ||
index.js | ||
listeners.js | ||
utils.js |