UNPKG

waterline-adapter-tests

Version:
72 lines (63 loc) 1.38 kB
module.exports = { tableName: 'teamTable', identity: 'team', connection: 'associations', primaryKey: 'id', fetchRecordsOnUpdate: true, fetchRecordsOnDestroy: false, fetchRecordsOnCreate: true, fetchRecordsOnCreateEach: true, attributes: { // Primary Key id: { type: Adapter.identity === 'sails-mongo' ? 'string' : 'number', columnName: '_id', autoMigrations: { columnType: Adapter.identity === 'sails-mongo' ? '_stringkey' : '_numberkey', autoIncrement: Adapter.identity === 'sails-mongo' ? false : true, unique: true } }, name: { columnName: 'handle', type: 'string', autoMigrations: { columnType: 'varchar' } }, mascot: { columnName: 'icon', type: 'string', autoMigrations: { columnType: 'varchar' } }, wins: { columnName: 'Ws', type: 'number', autoMigrations: { columnType: 'integer' } }, stadiums: { collection: 'Stadium', through: 'venue', via: 'team' }, // Timestamps updatedAt: { type: 'number', autoUpdatedAt: true, autoMigrations: { columnType: 'bigint' } }, createdAt: { type: 'number', autoCreatedAt: true, autoMigrations: { columnType: 'bigint' } } } };