On May 12, 4:46 am, Tim Uckun <[email protected]> wrote:
TO `people` (`date_of_birth`, `updated_at`, `gender`,
> `date_of_death`, `created_at`, `hash`, `first_name`, `middle_name`,
> `age`, `status`, `last_name`, `email`, `state`) VALUES (NULL,
> '2011-05-12 03:39:33', NULL, NULL, '2011-05-12 03:39:33', NULL, 'tim',
> NULL, NULL, 0, NULL, NULL, 0)
>
> Here is the migration
>
>  create_table :people do |t|
>       t.string :hash
>       t.string :first_name
>       t.string :last_name
>       t.string :middle_name
>       t.date   :date_of_birth
>       t.date   :date_of_death
>       t.integer :age
>       t.string :gender
>       t.string :email
>       t.integer :state , :default => 0
>       t.integer :status , :default => 0
>       t.timestamps
>     end
>
>     add_index :people, :email
>     add_index :people, :hash
>     add_index :people, :state
>     add_index :people, :status
>
> So there is nothing weird at all.

Having a column called hash is weird - Object has a method called
hash, which your attribute will shadow, which could mess up trying to
call uniq on an array containing objects of your class

Fred
>
> Very strange

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to