Hi, im migrating a website from php to rails and devise. There is a user table with password that are not encrypted. I made already a script in php to migrate to data to new database, but I cant figure how to encrypt password so i will work with devise. I foudn different solution on google, but one was working. Maybe I missed one ? ;-) thanks -- 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-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/S7cLvL5nh5AJ. For more options, visit https://groups.google.com/groups/opt_out.
On May 2, 2013, at 6:32 PM, oto iashvili <optimum.dulopin-QFKgK+z4sOrR7s880joybQ@public.gmane.org> wrote:> Hi, > im migrating a website from php to rails and devise. There is a user table with password that are not encrypted. I made already a script in php to migrate to data to new database, but I cant figure how to encrypt password so i will work with devise. I foudn different solution on google, but one was working. Maybe I missed one ? ;-)Rather than doing that, why not put the unencrypted password field in the database for a moment, then use Devise to encrypt it before dropping that column. Seems like it would have a better chance of getting the encryption right. Walter> > thanks > -- > 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-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/S7cLvL5nh5AJ. > 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
How about migrating your user table using ActiveRecord? I can get the data of a user from the old DB in some way, and migrate into the new DB using this : User.create(email: ''test-J0of1frlU80@public.gmane.org'', password: ''unencrypted password from old db'', password_confirmation :''same_password'') On 3 May 2013 07:02, oto iashvili <optimum.dulopin-QFKgK+z4sOrR7s880joybQ@public.gmane.org> wrote:> Hi, > im migrating a website from php to rails and devise. There is a user > table with password that are not encrypted. I made already a script in php > to migrate to data to new database, but I cant figure how to encrypt > password so i will work with devise. I foudn different solution on google, > but one was working. Maybe I missed one ? ;-) > > thanks > > -- > 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-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/S7cLvL5nh5AJ. > 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Thu, May 2, 2013 at 10:51 PM, Emil S <emil.soman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How about migrating your user table using ActiveRecord? > I can get the data of a user from the old DB in some way, and migrate into > the new DB using this : > > User.create(email: ''test-J0of1frlU80@public.gmane.org'', password: ''unencrypted password from old > db'', password_confirmation :''same_password'') > > > > On 3 May 2013 07:02, oto iashvili <optimum.dulopin-QFKgK+z4sOrR7s880joybQ@public.gmane.org> wrote: >> >> Hi, >> im migrating a website from php to rails and devise. There is a user >> table with password that are not encrypted. I made already a script in php >> to migrate to data to new database, but I cant figure how to encrypt >> password so i will work with devise. I foudn different solution on google, >> but one was working. Maybe I missed one ? ;-) >> >> thanksI''m a bit leary of doing that sort of thing in a schema migration; it''s something which cannot readily be rolled back, nor is it something that will give you usefullness if you someday need to rebuild your schema.rb from scratch... -- 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-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.