acts_as_archive
acts_as_archive copied to clipboard
error in sqlite3
use jruby1.6rc1,rails3.0.1,activerecord-jdbcsqlite3-adapter,in migrate use: ActsAsArchive.update Post it show: AlsoMigrate error: ActiveRecord::JDBCError: near "LIKE": syntax error: CREATE TABLE archived_posts LIKE posts;
It seems you need to add parenthesis around the sql "like xxx".
It's related to "also_migrate", see https://github.com/echarp/also_migrate
It seems that: CREATE TABLE
Looking at the code more closely, I worked around the borked table creation by specifying the :indexes option: acts_as_archive :indexes => [:id] which forces the code through a slightly different path to make it work.
Now the migration will actually create the archive tables, but the next problem is that records are deleted from the origin table and never actually created in the archive table.
Hey guys, thanks for looking into this. I am going to look into getting the specs running in SQLite this weekend. If anybody makes it there before me, it would be much appreciated.