On 12 March 2013 12:58, avinash behera <[email protected]> wrote:
> The main reason I am doing this is :-
> I am uploading some images to s3 amazon.
> I am saving those images in s3 through rake script.
> I have two tables having images.
> Both are saving in one folder in s3.
> I want to save those based on ids, so that there will not be any conflict.

I don't understand what you mean, do you mean you have two tables and
want to keep the ids of the two tables distinct from each other?  If
so then that is a bad idea, it will be sure to cause you problems at
some time in the future.  A better idea might be to have a third table
(images) that manages all the images and has a relationship to the
other tables.  Possibly polymorphic (see
http://guides.rubyonrails.org/association_basics.html#polymorphic-associations
).

Colin

>
> On Tue, Mar 12, 2013 at 4:35 PM, Colin Law <[email protected]> wrote:
>>
>> On 12 March 2013 10:58, Avi <[email protected]> wrote:
>> > Hello All,
>> >
>> > How do I change the heroku database( already existed ) table id to start
>> > from say 1000?
>>
>> Don't bother.  You should never care what the id is for a record, it
>> will just make life difficult if you do.  If you want a column with a
>> meaningful number in it then add an extra column rather than using the
>> id.
>>
>> Colin
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
>
>
> --
> Thanks & Regards,
> Avinash Behera
> M-09538712979
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to 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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to