Home » Blog » Reply » Reply To: Using Sqlite3 in ruby on rails and cmd

Reply To: Using Sqlite3 in ruby on rails and cmd

Stephen West ~ Modified: September 14th, 2015 ~ ~ 1 Minute Reading

Home Forums Using Sqlite3 in ruby on rails and cmd Reply To: Using Sqlite3 in ruby on rails and cmd

#651 Score: 0
Stephen West
Moderator
4 pts

You should avoid directly manipulating the database and use migrations instead. If you forgot to add a column then you should create a new migration using add_column to add the column to the table.

Alternativly if the previous migration was the one that created the table with the missing column and you’ve not distributed this migration yet you can do rake db:rollback, editing the migration and run rake db:migrate again.

Your lack of tables when running the sqlite command is most likely because you forgot to specify the sqlite file to load: sqlite3 <db_name>