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.
17 lines
612 B
JavaScript
17 lines
612 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
up: function createUniqueConstraintViolationTable(knex, errorHandler) {
|
|
return knex.schema.createTable("composite_unique_constraint_violation", (table) => {
|
|
table.increments("id");
|
|
table.text("email");
|
|
table.text("username");
|
|
table.text("name");
|
|
table.unique(["email", "username"]);
|
|
}).catch(errorHandler);
|
|
},
|
|
down: function dropUniqueConstraintViolationTable(knex, errorHandler) {
|
|
return knex.schema.dropTable("composite_unique_constraint_violation").catch(errorHandler);
|
|
}
|
|
};
|