0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Added lexical column to snippets table (#16632)

refs TryGhost/Team#2904

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 04a6b06</samp>

This pull request adds a new `lexical` column to the `snippets` table to
store lexical information for snippets. It includes a migration script,
a schema update, and a schema hash update.
This commit is contained in:
Elena Baidakova 2023-04-14 13:18:41 +04:00 committed by GitHub
parent 062a716fbc
commit eaf6e3c7e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,8 @@
const {createAddColumnMigration} = require('../../utils');
module.exports = createAddColumnMigration('snippets', 'lexical', {
type: 'text',
maxlength: 1000000000,
fieldtype: 'long',
nullable: true
});

View file

@ -876,6 +876,7 @@ module.exports = {
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
name: {type: 'string', maxlength: 191, nullable: false, unique: true},
mobiledoc: {type: 'text', maxlength: 1000000000, fieldtype: 'long', nullable: false},
lexical: {type: 'text', maxlength: 1000000000, fieldtype: 'long', nullable: true},
created_at: {type: 'dateTime', nullable: false},
created_by: {type: 'string', maxlength: 24, nullable: false},
updated_at: {type: 'dateTime', nullable: true},

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 = '395330cb390d669843e4913b63a4cf25';
const currentSchemaHash = '8ec1f25b5e9e1dde5b1b8ee04dacf4f9';
const currentFixturesHash = '869ceb3302303494c645f4201540ead3';
const currentSettingsHash = 'e2fc04c37fe89e972b063ee8fd1d4bec';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';