0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Added active column to offers table (#13592)

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

This will be used as a flag to determine whether or not an Offer is
archived or active.
This commit is contained in:
Fabien 'egg' O'Carroll 2021-10-12 15:20:45 +02:00 committed by GitHub
parent 1bb9c3a9ac
commit b48c16c118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

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

View file

@ -386,6 +386,7 @@ module.exports = {
},
offers: {
id: {type: 'string', maxlength: 24, nullable: false, primary: true},
active: {type: 'boolean', nullable: false, defaultTo: true},
name: {type: 'string', maxlength: 191, nullable: false, unique: true},
code: {type: 'string', maxlength: 191, nullable: false, unique: true},
product_id: {type: 'string', maxlength: 24, nullable: false, references: 'products.id'},

View file

@ -32,7 +32,7 @@ const defaultSettings = require('../../../../../core/server/data/schema/default-
*/
describe('DB version integrity', function () {
// Only these variables should need updating
const currentSchemaHash = 'c1c45b460f39504a01b26fcd7a62f395';
const currentSchemaHash = '2b5213b4ead41042194d4a9051bf0e8a';
const currentFixturesHash = 'c064a1b57c594e6a8d36f9e884df0a2a';
const currentSettingsHash = 'aa3fcbc8ab119b630aeda7366ead5493';
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';