Forum: Ruby on Rails problem with acts_as_versioned and comatose

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E259316c4ff076e0e96ce22f12966686?d=identicon&s=25 Shafeer Haja (shafhuz)
on 2007-03-01 16:01
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.
This topic is locked and can not be replied to.