Like some others, I am having trouble with an error
"ActiveRecord::StatementInvalid: SQLite3::SQLException: object name reserved for internal use: sqlite_sp_functions: CREATE TABLE "sqlite_sp_functions" ("name" text, "text" text)"
when running rake test
on a Rails project.
The offending lines in schema.rb
are:
create_table "sqlite_sp_functions", id: false, force: true do |t|
t.text "name"
t.text "text"
end
The suggestions on the previous query about this involved editing schema.rb
or deleting that file & regenerating it, but schema.rb
(and the offending code) are regenerated on each migration (plus, I don't want to delete Rails-generated code without knowing the implications), so that's not really a satisfactory solution.
So what is the sqlite_sp_functions
table for, and how can I get Rails to generate a schema.rb
file that doesn't break rake test
for the project?