0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Added verified mention column (#16264)

refs https://github.com/TryGhost/Team/issues/2549

- Added `verified` column to mentions table
- Added a new migration
- Updated schema
- Updated integrity test
This commit is contained in:
Ronald Langeveld 2023-02-14 15:46:07 +08:00 committed by GitHub
parent 7f278bd762
commit c651f5b10f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 3 deletions

View file

@ -0,0 +1,7 @@
const {createAddColumnMigration} = require('../../utils');
module.exports = createAddColumnMigration('mentions', 'verified', {
type: 'boolean',
nullable: false,
defaultTo: false
});

View file

@ -995,6 +995,7 @@ module.exports = {
resource_type: {type: 'string', maxlength: 50, nullable: true},
created_at: {type: 'dateTime', nullable: false},
payload: {type: 'text', maxlength: 65535, nullable: true},
deleted: {type: 'boolean', nullable: false, defaultTo: false}
deleted: {type: 'boolean', nullable: false, defaultTo: false},
verified: {type: 'boolean', nullable: false, defaultTo: false}
}
};

View file

@ -3,7 +3,8 @@ const ghostBookshelf = require('./base');
const Mention = ghostBookshelf.Model.extend({
tableName: 'mentions',
defaults: {
deleted: false
deleted: false,
verified: false
},
enforcedFilters() {
return 'deleted:false';

View file

@ -35,7 +35,7 @@ const validateRouteSettings = require('../../../../../core/server/services/route
*/
describe('DB version integrity', function () {
// Only these variables should need updating
const currentSchemaHash = '81c292a8a7d03c099ad512c9372c42eb';
const currentSchemaHash = '778b2c14d55231fd9f077e9a96f8ab58';
const currentFixturesHash = 'd99d3c2891e79b8662ed6a312490d2fd';
const currentSettingsHash = 'b0c8359b7482e39112e7c5739d43f11b';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';