mirror of
https://github.com/outline/outline.git
synced 2026-11-30 17:10:36 +03:00
Add index column in collections
This commit is contained in:
1 parent
b0008cb3ea
commit
2288082946
3 files changed
+19
No files matched your search
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.addColumn("collections", "index", {
|
||||
type: Sequelize.TEXT,
|
||||
defaultValue: null,
|
||||
});
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeColumn("collections", "index");
|
||||
},
|
||||
};
|
||||
@@ -21,6 +21,10 @@ const Collection = sequelize.define(
|
||||
description: DataTypes.STRING,
|
||||
icon: DataTypes.STRING,
|
||||
color: DataTypes.STRING,
|
||||
index: {
|
||||
type: DataTypes.STRING,
|
||||
defaultValue: null,
|
||||
},
|
||||
private: DataTypes.BOOLEAN,
|
||||
maintainerApprovalRequired: DataTypes.BOOLEAN,
|
||||
documentStructure: DataTypes.JSONB,
|
||||
|
||||
@@ -28,6 +28,7 @@ export default function present(collection: Collection) {
|
||||
description: collection.description,
|
||||
sort: collection.sort,
|
||||
icon: collection.icon,
|
||||
index: collection.index,
|
||||
color: collection.color || "#4E5C6E",
|
||||
private: collection.private,
|
||||
sharing: collection.sharing,
|
||||
|
||||
Reference in new issue
Block a user