switching from Sqlite3 to PostgreSQL on an existing rails application -
when tried switching sqlite3 postgresql in existing application faced problem rake db:migrate
, did following
1 - rake db:create
2- rake db:migrate
got error:
== addcolumn1: migrating ===================================================== -- add_column(:users, :first_name, :string) rake aborted! error has occurred, , later migrations canceled: pg::error: error: relation "users" not exist
3- rake db:reset
4- rake db:migrate
, migration done no errors
i have lost data specially admin user because of rake db:reset , questions :
1- why forced use rake db:reset
?
2- there ways transfer data database engine without losing in next time ?
3- , postgresql couldn’t use blank password , said fe_sendauth: no password supplied
, after adding password error gone , using password in database engine instead of sqlite3 must ?
4- heroku require reset or github accept data if use db engine in development ?
this railscast great resource on migrating, , should answer of questions:
Comments
Post a Comment