You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
437 B
JavaScript

'use strict';
const Promise = require("bluebird");
module.exports = function attemptEnumViolation(knex) {
return Promise.try(() => {
return knex("enum_violation").insert({
number_value: "one",
name: "Joe"
}).returning("id");
}).then((id) => {
return knex("enum_violation").update({
number_value: "four"
}).where({
id: id[0]
});
});
};