mirror of
https://github.com/outline/outline.git
synced 2026-11-21 21:44:30 +03:00
Add constraints and indexes to migration
This commit is contained in:
1 parent
e9afc1d91f
commit
ea79883e04
1 file changed
+8
-1
@@ -49,7 +49,8 @@ module.exports = {
|
||||
references: {
|
||||
model: "teams",
|
||||
},
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
onDelete: "cascade"
|
||||
},
|
||||
createdById: {
|
||||
type: Sequelize.UUID,
|
||||
@@ -98,6 +99,7 @@ module.exports = {
|
||||
references: {
|
||||
model: "oauth_clients",
|
||||
},
|
||||
onDelete: "cascade",
|
||||
allowNull: false
|
||||
},
|
||||
userId: {
|
||||
@@ -105,6 +107,7 @@ module.exports = {
|
||||
references: {
|
||||
model: "users",
|
||||
},
|
||||
onDelete: "cascade",
|
||||
allowNull: false
|
||||
},
|
||||
redirectUri: {
|
||||
@@ -160,6 +163,7 @@ module.exports = {
|
||||
references: {
|
||||
model: "oauth_clients",
|
||||
},
|
||||
onDelete: "cascade",
|
||||
allowNull: false
|
||||
},
|
||||
userId: {
|
||||
@@ -167,6 +171,7 @@ module.exports = {
|
||||
references: {
|
||||
model: "users",
|
||||
},
|
||||
onDelete: "cascade",
|
||||
allowNull: false
|
||||
},
|
||||
createdAt: {
|
||||
@@ -184,6 +189,8 @@ module.exports = {
|
||||
}, {
|
||||
transaction
|
||||
});
|
||||
|
||||
queryInterface.addIndex("oauth_clients", ["teamId"], { transaction });
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user