add indexes to db

This commit is contained in:
Brian Gough 2015-05-15 14:05:17 +01:00
parent aa32cbc1ee
commit 6ebcd9e8fd

View file

@ -16,11 +16,20 @@ module.exports =
url: Sequelize.STRING
project_id: Sequelize.STRING
lastModified: Sequelize.DATE
}, {
indexes: [
{fields: ['url', 'project_id']},
{fields: ['project_id']}
]
})
Project: sequelize.define("Project", {
project_id: Sequelize.STRING
project_id: {type: Sequelize.STRING, primaryKey: true}
lastAccessed: Sequelize.DATE
}, {
indexes: [
{fields: ['lastAccessed']}
]
})
sync: () -> sequelize.sync()