[fix] comment ap_id key length
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
module.exports = (sequelize, DataTypes) => {
|
module.exports = (sequelize, DataTypes) => {
|
||||||
const comment = sequelize.define('comment', {
|
const comment = sequelize.define('comment', {
|
||||||
activitypub_id: {
|
activitypub_id: {
|
||||||
type: DataTypes.STRING(18),
|
type: DataTypes.STRING,
|
||||||
index: true,
|
index: true,
|
||||||
unique: true
|
unique: true
|
||||||
},
|
},
|
||||||
|
|||||||
19
server/migrations/20191112101545-ap_comment_id.js
Normal file
19
server/migrations/20191112101545-ap_comment_id.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
up: (queryInterface, Sequelize) => {
|
||||||
|
return queryInterface.changeColumn('comments', 'activitypub_id', {
|
||||||
|
type: Sequelize.STRING,
|
||||||
|
index: true,
|
||||||
|
unique: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
down: (queryInterface, Sequelize) => {
|
||||||
|
return queryInterface.changeColumn('comments', 'activitypub_id', {
|
||||||
|
type: Sequelize.STRING(18),
|
||||||
|
index: true,
|
||||||
|
unique: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user