We'll respond shortly.
We’re working on an upgrade form 3.0.4 and we got a database error when we tried to generate fixtures or seed the db:
PGError: ERROR: relation "data" does not exist LINE 4: WHERE a.attrelid = '"metadata"'::regclass
We first ran into this with a
has_one :metadata association but you’d have the same problem without any associations to the
Metadata class. Investigation lead to this discovery:
rails-3.0.4 > Metadata.table_name => "metadatas" rails-3.0.5 > Metadata.table_name => "metadata"
This fixed double-pluralization of irregular plurals for ticket 6363.
rails-3.0.4 > ActiveSupport::Inflector.pluralize "metadata" => "metadatas" rails-3.0.5 > ActiveSupport::Inflector.pluralize "metadata" => "metadata"
Here are example of the four changed nouns:
Anyway, quick fix:
class Metadata < ActiveRecord::Base set_table_name "metadatas" end
Of course, we could rename our metadata class and table…
Thanks to this guy for pointing this out!