Hello,
I’m a beginner, so any hints are appreciated; I’m still trying to find my way around Rails code. For a bug I’ve found I need to create a table called “values” so I added this:
create_table :values do |t|
t.integer :value
end
among the other table creations in activerecord/test/cases/migration_test.rb. Is that ok? But then, when I run the tests for a second time, I get an error about values already existing. Where are the drop table calls? I couldn’t find them.
My more immediate problem so far is that I’m getting this error:
/Users/pupeno/Projects/rails/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:210:in log': Mysql::Error: Table 'camelcase' already exists: CREATE TABLE
CamelCase (
idint(11) DEFAULT NULL auto_increment PRIMARY KEY,
name` varchar(255)) ENGINE=InnoDB (ActiveRecord::StatementInvalid)
It started happening when I was playing with adding and not adding value. The whole output is bellow. The puzzling part is that CamelCase doesn’t exist. I actually dropped and re-created the activerecord_unittest tables just to be sure. It never creates CamelCase in there. SQlite3 tests run just fine, I haven’t tried PostgreSQL.
This is the state of the databases just after running the tests and failing:
use activerecord_unittest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed