Sha256: 78b37bd7aef9b180256daafbe1890cef096e0f45f2bf3ad71f55d2360b678f64
Contents?: true
Size: 1001 Bytes
Versions: 30
Compression:
Stored size: 1001 Bytes
Contents
module Scrivito module Migrations class CmsBackend def read if obj = find_migration_store_obj obj.data_from_cms.value_of('versions') else '' end end def save(value) Workspace.current.update_obj(migration_store_obj.id, { obj: { versions: ['string', value] } }) Workspace.current.reload end private def create obj_id = SecureRandom.hex(8) Workspace.current.update_obj(obj_id, { obj: { _id: obj_id, _obj_class: 'MigrationStore', _path: path, versions: ['string', ''], } }) Workspace.current.reload end def migration_store_obj create unless find_migration_store_obj find_migration_store_obj end def find_migration_store_obj Obj.find_by_path(path) end def path '/_internal/migration-store' end end end end
Version data entries
30 entries across 30 versions & 1 rubygems