feat: allow ad-hoc creation of new teams (#3964)
Co-authored-by: Tom Moor <tom@getoutline.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
async up (queryInterface, Sequelize) {
|
||||
await queryInterface.removeConstraint("authentication_providers", "authentication_providers_providerId_key");
|
||||
await queryInterface.addConstraint("authentication_providers", {
|
||||
type: 'unique',
|
||||
fields: ["providerId", "teamId"],
|
||||
name: "authentication_providers_providerId_teamId_uk"
|
||||
});
|
||||
},
|
||||
|
||||
async down (queryInterface, Sequelize) {
|
||||
await queryInterface.removeConstraint("authentication_providers", "authentication_providers_providerId_teamId_uk");
|
||||
await queryInterface.addConstraint("authentication_providers", {
|
||||
type: 'unique',
|
||||
fields: ["providerId"],
|
||||
name: "authentication_providers_providerId_key"
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
async up (queryInterface, Sequelize) {
|
||||
await queryInterface.removeConstraint("user_authentications", "user_authentications_providerId_key");
|
||||
await queryInterface.addConstraint("user_authentications", {
|
||||
type: 'unique',
|
||||
fields: ["providerId", "userId"],
|
||||
name: "user_authentications_providerId_userId_uk"
|
||||
});
|
||||
},
|
||||
|
||||
async down (queryInterface, Sequelize) {
|
||||
await queryInterface.removeConstraint("user_authentications", "user_authentications_providerId_userId_uk");
|
||||
await queryInterface.addConstraint("user_authentications", {
|
||||
type: 'unique',
|
||||
fields: ["providerId"],
|
||||
name: "user_authentications_providerId_key"
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user