mirror of
https://github.com/outline/outline.git
synced 2026-11-23 06:11:04 +03:00
fix: add index column to user_permissions
This commit is contained in:
1 parent
9ba8b197ce
commit
03efcae48e
2 files changed
+19
No files matched your search
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.addColumn("user_permissions", "index", {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: true,
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface, Sequelize) {
|
||||
await queryInterface.removeColumn("user_permissions", "index");
|
||||
},
|
||||
};
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
Table,
|
||||
DataType,
|
||||
Scopes,
|
||||
AllowNull,
|
||||
} from "sequelize-typescript";
|
||||
import { CollectionPermission, DocumentPermission } from "@shared/types";
|
||||
import Collection from "./Collection";
|
||||
@@ -45,6 +46,10 @@ class UserPermission extends IdModel {
|
||||
@Column(DataType.STRING)
|
||||
permission: CollectionPermission | DocumentPermission;
|
||||
|
||||
@AllowNull
|
||||
@Column
|
||||
index: string | null;
|
||||
|
||||
// associations
|
||||
|
||||
@BelongsTo(() => Collection, "collectionId")
|
||||
|
||||
Reference in new issue
Block a user