Simple Database Migration

13 views
Skip to first unread message

Kane Scott

unread,
May 1, 2016, 11:29:47 PM5/1/16
to rubyonra...@googlegroups.com
I am very new to Ruby and need to do a simple database migration. I have
a table in my database called data_sources and I need to update record
id 3 field systems from Fusion to Fusion,Matrix.

I had ruby auto create the file but then I just got lost.

class UpdateDataSourcesGlvarSystems < ActiveRecord::Migration
def change
end
end

Thanks for the help,

Kane

--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
May 2, 2016, 3:34:05 AM5/2/16
to Ruby on Rails: Talk
On 2 May 2016 at 04:29, Kane Scott <li...@ruby-forum.com> wrote:
> I am very new to Ruby and need to do a simple database migration. I have
> a table in my database called data_sources and I need to update record
> id 3 field systems from Fusion to Fusion,Matrix.

Do you mean that you are trying to change the contents of just one
record in the database from one text string to another? That is not
what migrations are for, they are for changing the structure of the
database.

As you are a beginner I suggest you start by working right through a
good tutorial such as railstutorial.org (which is free to use online)
which will show you the basics of rails.

Colin


>
> I had ruby auto create the file but then I just got lost.
>
> class UpdateDataSourcesGlvarSystems < ActiveRecord::Migration
> def change
> end
> end
>
> Thanks for the help,
>
> Kane
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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 rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/eb24308912176bb3fc9005055f538a68%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.

Kane Scott

unread,
May 2, 2016, 3:50:11 AM5/2/16
to rubyonra...@googlegroups.com
Thank you I will do that.
Reply all
Reply to author
Forward
0 new messages