waterline-adapter-tests
Version:
Integration tests for waterline adapters
59 lines (51 loc) • 1.04 kB
JavaScript
module.exports = {
tableName: 'customerbelongsPKTable',
identity: 'customerbelongscustom',
connection: 'associations',
primaryKey: 'username',
fetchRecordsOnUpdate: true,
fetchRecordsOnDestroy: false,
fetchRecordsOnCreate: true,
fetchRecordsOnCreateEach: true,
attributes: {
username: {
type: 'string',
required: true,
autoMigrations: {
columnType: 'varchar',
unique: true
}
},
name: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
title: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
payments: {
collection: 'Paymentbelongscustom',
via: 'customer'
},
// Timestamps
updatedAt: {
type: 'number',
autoUpdatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
},
createdAt: {
type: 'number',
autoCreatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
}
}
};