browsermedia/browsercms — Issue #480: Standard Version Column (i.e. original_record_id)
Author: peakpg
Created: 2012-02-16 19:49:17+00:00
State: open

In <= 3.3.x, each versioned block has its own versions table, which maintained a pointer to the 'current' row by a named column. So in html_block_versions, it had a `html_block_id` column. With how Rails treats namespaced models, this got too messy, so ALL Block Versions just use the column `original_record_id`. This means, for any modules, you need to update your `_versions` table accordingly.

The migration to fix this looks this, assuming we have a module `BcmsYourModule` with a Block called `Widget`

```
if column_exists? :bcms_your_module_widget_versions, :widget_id
rename_column :bcms_your_module_widget_versions, :widget_id, :original_record_id
end
```