Commit 87502983 authored by Mark Stenglein's avatar Mark Stenglein

Change primary key

- Mason is dumb and does not keep CRN's unique, so we need a
  combination index between both the CRN and the semester slug
parent 13a87132
...@@ -3,8 +3,6 @@ module.exports = function (sequelize, DataTypes) { ...@@ -3,8 +3,6 @@ module.exports = function (sequelize, DataTypes) {
// unique index/key // unique index/key
crn: { crn: {
type: DataTypes.STRING, type: DataTypes.STRING,
unique: true,
primaryKey: true
}, },
semester: { semester: {
...@@ -89,7 +87,7 @@ module.exports = function (sequelize, DataTypes) { ...@@ -89,7 +87,7 @@ module.exports = function (sequelize, DataTypes) {
indexes: [ indexes: [
{ {
unique: true, unique: true,
fields: ['crn'] fields: ['crn', 'semester']
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment