# Problem with acts\_as\_versioned and comatose

**URL:** <https://www.ruby-forum.com/t/problem-with-acts-as-versioned-and-comatose/87308>\
**Category:** Rails\
**Created:** [March 1, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/problem-with-acts-as-versioned-and-comatose/87308 "2007-03-01T16:01:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shafhuz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/278dde/32.png) [@shafhuz](https://www.ruby-forum.com/u/shafhuz)\
**Post date:** [March 1, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/problem-with-acts-as-versioned-and-comatose/87308/1 "2007-03-01T16:01:42Z")

</div>

Hi there,

I’m would like to use the comatose plugin for CMS and have a problem  
running the migration script. The error is produced by the comatose  
migration script is thrown by the acts\_as\_versioned call (at line 4).

module Comatose  
class Page \< ActiveRecord::Base  
set\_table\_name ‘comatose\_pages’  
acts\_as\_versioned :if\_changed =\> [:title, :slug, :keywords, :body]  
end  
end

class AddComatoseSupport \< ActiveRecord::Migration

# Schema for Comatose version 0.7+

def self.up  
create\_table :comatose\_pages do |t|  
…  
end  
Comatose::Page.create\_versioned\_table  
puts “Creating the default ‘Home Page’…”  
Comatose::Page.create( :title=\>‘Home Page’, :body=\>“h1. Welcome…”,  
:author=\>‘System’ )  
end

def self.down  
Comatose::Page.drop\_versioned\_table  
drop\_table :comatose\_pages  
end

end

The error I get is as follows;

rake aborted!  
Mysql::Error: #42S02Table ‘project\_development.page\_versions’ doesn’t  
exist: SHOW FIELDS FROM page\_versions

I couldn’t figure out what could be the reason! Any help would be  
appreciated!

Regards,  
Shafeer.
