mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 00:15:11 +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'] ] } |
||
---|---|---|
.. | ||
adapters | ||
api | ||
data | ||
lib | ||
models | ||
public | ||
services | ||
translations | ||
views | ||
web | ||
analytics-events.js | ||
ghost-server.js | ||
index.js | ||
overrides.js | ||
update-check.js |