Hello , I am a ROR beginner. I did scaffolding and made a table called register with a field "name". Now when I tried to add one more column using add migration and then rake db:migrate, the command is executing successfully but new columns are not coming in the table Sam
on 2008-10-24 12:37
on 2008-10-28 15:25
Sam John wrote: > Hello , > > I am a ROR beginner. I did scaffolding and made a table called > register with a field "name". Now when I tried to add one more column > using add migration and then rake db:migrate, the command is executing > successfully but new columns are not coming in the table > > Sam can u plz brief a lil bit more than i am able to understand ...that y ur columns are not coming in the table
on 2008-10-29 07:18
Sara Criss wrote: > Sam John wrote: >> Hello , >> >> I am a ROR beginner. I did scaffolding and made a table called >> register with a field "name". Now when I tried to add one more column >> using add migration and then rake db:migrate, the command is executing >> successfully but new columns are not coming in the table >> >> Sam > > can u plz brief a lil bit more than i am able to understand ...that y ur > columns are not coming in the table Thank you for the reply :-) . I will explain . I did scaffolding and made a table called register with a field "name" . After that as I wanted to add more fields in that table I did the add migration command which is "ruby script/generate migration AddPasswordToRegister password:varchar" and also the rake db:migrate command. But when I run it on the browser the new column (password) which has been added is not showing there. it is only showing the "name" field which i got when i did scaffolding. I am able to add many columns through migration but they are not displaying on the browser. When I checked the files in my system , I could find out that new migration files are being created in the db/migration folder but nothing is being created in the views. hope this would help you to understand my problem now Sam
on 2008-11-05 06:19
Sam Migration is to database and Scaffold is for view purpose. On running migration a column may be added to yr DB. Check that first if there is a column the work of migration is that and its done. Scaffold is responsible to generate CRUD skeleton code. Since you did scaffold before adding the new field password thats not reflected. Cheers, Ratnvael.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.