thelac/boxplot — pull request #60 by ajyang818 (2014-05-25 14:22:40+00:00)
Title: Issue #31: Preventing creation of group with same name as existing group

So this is a really dumb way of doing it: when a user tries to create a group, we'll query for all existing groups, and compare the 'normalized' names to the proposed new group's name.

Originally I wanted to add a migration to the Groups table to include a column for 'normalizedName', but I couldn't figure out how to get migrations to work with sequelize :( I was trying to follow the instructions on [here](http://sequelizejs.com/docs/latest/migrations), but it was trying to migrate mySql instead of postgres? If somebody can point me to an example of sequelize migrations with postgres, happy to implement that instead.

Also, importing utils with `var utils = require(APP_ROOT + '/utils/utils');` in group.js didn't give me access to `utils` in the router. I'm guessing it's a scope problem (damn javascript), but taking away the `var` made it work...so yea. @yjkogan can tell me if I've done something horrible.

@danielsuo and @yjkogan please review?