-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error in sqlite3 #14
Comments
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: is not supported by sqlite. I also see this sqlite related commit from a fork https://github.com/foolabs/acts_as_archive/blob/b1b57e16b238602d25ee9bcdd0ca073519a9a037/require.rb. Putting parens around the like clause allows the migration to proceed, but my schema.rb ends ups with the following comment:
Looking at the database itself, I see that sqlite is treating LIKE as a column name:
This problem is not specific to jruby as my development environment is a stock rails 3.0.3 project. It seems very odd that this projects seems fairly sophisticated and somewhat mature yet fails so miserably out of the box. How could this not work in the default rails dev environment? Seems like I must be missing something. Any hints would be fabulous. |
Looking at the code more closely, I worked around the borked table creation by specifying the :indexes option: 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. |
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;
The text was updated successfully, but these errors were encountered: