Migrate existing journals so version 1 is open for the initial journal
This commit is contained in:
parent
8b13992c0a
commit
2ff9711fc7
|
@ -12,7 +12,7 @@ class UpdateJournalsForActsAsJournalized < ActiveRecord::Migration
|
|||
klass_name = "#{j.journalized_type}Journal"
|
||||
j = j.becomes(klass_name.constantize)
|
||||
j.type = klass_name
|
||||
j.version = idx + 1
|
||||
j.version = idx + 2 # initial journal should be 1
|
||||
# FIXME: Find some way to choose the right activity here
|
||||
j.activity_type = j.journalized_type.constantize.activity_provider_options.keys.first
|
||||
j.save(false)
|
||||
|
|
Loading…
Reference in New Issue