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
472 B
JavaScript

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