Merge pull request #23 from sharelatex/add-mysql-indexes

add indexes to mysql db
This commit is contained in:
Brian Gough 2015-05-21 12:21:59 +01:00
commit 3dec42be2a

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()