On 8 January 2013 12:33, DHAMODHARAN N <[email protected]> wrote:
> Migration1:
> class RenameTableForMailchimp < ActiveRecord::Migration
>   def change
>     rename_table :ctct_contacts, :contacts
>   end
> end
>
> Migration2:
> class AddTypeColumnForMailchimp < ActiveRecord::Migration
>   def change
>     add_column :contacts, :type, :string
>     end
> end

Please don't top post, it makes it difficult to follow the thread.
Insert your replies inline at appropriate points.

The error you showed came from
/home/dhamodharan/project/application20Web/db/migrate/20121128075457_add_ctct_contact_uniqueness.rb:9:in
`change' so it might be helpful to show that migration.  I presume the
migrations above ran successfully and that you have checked in the
database that the table has been renamed and the type column added ok.

Colin



>
>
> On Tue, Jan 8, 2013 at 5:13 PM, Colin Law <[email protected]> wrote:
>>
>> On 8 January 2013 11:34, DHAMODHARAN N <[email protected]> wrote:
>> > Hi Colin Law,
>> >
>> > Existin code ctct_contact.rb => class CtctContact < Contact
>> >
>> > After changes ctct_contact.rb => class CtctContact < ActiveRecord::Base
>> >
>> > Above changes works fine for me but we cant proceed with that changes
>> > right?
>>
>> I don't understand what you mean.  I thought you were moving /to/ STI,
>> not away from it.
>>
>> >
>> >
>> > Trace :
>> >
>> > -- add_index(:ctct_contacts, [:ctct_account_id, :email_address],
>> > {:unique=>true})
>> >    -> 0.0732s
>> > rake aborted!
>> > An error has occurred, this and all later migrations canceled:
>> >
>> > PG::Error: ERROR:  relation "contacts" does not exist
>>
>> Show us the whole migration code please.
>>
>> Colin
>>
>> --
>> 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 https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> 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 https://groups.google.com/groups/opt_out.
>
>

-- 
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 https://groups.google.com/groups/opt_out.


Reply via email to