Forum: Ruby on Rails SQLITE Database Browser question

Posted by Lars (Guest)
on 2012-10-30 12:26
(Received via mailing list)
Is there a way to add another field to a blog(i.e. another text field)
using database browser.  I was able to make the changes using the Sqlite
Database Browser and saved but the changes didn't migrate over to my 
app.
Posted by Hassan Schroeder (Guest)
on 2012-10-30 12:43
(Received via mailing list)
On Mon, Oct 29, 2012 at 4:17 PM, Lars <larsgbr@gmail.com> wrote:
> Is there a way to add another field to a blog(i.e. another text field) using
> database browser.  I was able to make the changes using the Sqlite Database
> Browser and saved but the changes didn't migrate over to my app.

The proper Rails way to change your DB schema is using migrations,
not direct manipulation. Not only do you have a historical record of the
changes, it's easier to make the exact same change to a staging or
production environment, or back out the change in development.

Regardless, if you want a new field to appear in your views, etc. you
have to add that code yourself.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
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
No account? Register here.