Lambda-School-Labs/Labs26-StorySquad-BE-TeamB

View on GitHub
data/migrations/20201019142221_votes-unique-constraint.js

Summary

Maintainability
A
1 hr
Test Coverage
exports.up = function (knex) {
  return knex.schema.table('Votes', (t) => {
    t.unique(['MemberID', 'FaceoffID']);
  });
};

exports.down = function (knex) {
  return knex.schema.table('Votes', (t) => {
    t.dropUnique(['MemberID', 'FaceoffID']);
  });
};