waterline-schema
Version:
The core schema builder used in the Waterline ORM.
51 lines (44 loc) • 2.35 kB
JavaScript
// ██╗ ██╗ █████╗ ██╗ ██╗██████╗
// ██║ ██║██╔══██╗██║ ██║██╔══██╗
// ██║ ██║███████║██║ ██║██║ ██║
// ╚██╗ ██╔╝██╔══██║██║ ██║██║ ██║
// ╚████╔╝ ██║ ██║███████╗██║██████╔╝
// ╚═══╝ ╚═╝ ╚═╝╚══════╝╚═╝╚═════╝
//
// ██████╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗ ████████╗██╗███████╗███████╗
// ██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██████╔╝██████╔╝██║ ██║██████╔╝█████╗ ██████╔╝ ██║ ██║█████╗ ███████╗
// ██╔═══╝ ██╔══██╗██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗ ██║ ██║██╔══╝ ╚════██║
// ██║ ██║ ██║╚██████╔╝██║ ███████╗██║ ██║ ██║ ██║███████╗███████║
// ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝
//
module.exports = [
// Basic semantics:
'type',
'defaultsTo',
'required',
'allowNull',
'autoUpdatedAt',
'autoCreatedAt',
// Auto-migrations:
'autoMigrations',
// High-level validation rules:
'validations',
// Associations:
'through',
'collection',
'model',
'via',
'dominant',
// Adapter:
'columnName',
'meta',
// At-rest encryption:
'encrypt',
// Advisory
'description',
'extendedDescription',
'moreInfoUrl',
'example',
'protect',
];