不要怂,就是干,撸起袖子干!

unknown-constraint-error.js 590 Bytes
'use strict';

const DatabaseError = require('./../database-error');

/**
 * Thrown when constraint name is not found in the database
 */
class UnknownConstraintError extends DatabaseError {
  constructor(options = {}) {
    options.parent = options.parent || { sql: '' };

    super(options.parent);
    this.name = 'SequelizeUnknownConstraintError';

    this.message = options.message || 'The specified constraint does not exist';
    this.constraint = options.constraint;
    this.fields = options.fields;
    this.table = options.table;
  }
}

module.exports = UnknownConstraintError;