Rails will not run this PostgreSQL migration, why? -


i have migration :

def   connection.execute(%q{     alter table enterprise_members     alter column sso_id     type string using cast(sso_id string)   }) end 

where trying convert integer string. when run, returns :

pg::undefinedobject: error:  type "string" not exist :          alter table enterprise_members         alter column sso_id         type string using cast(sso_id string) 

is because i'm trying cast it? how fix this?

you can call string when using rails if choose go manual way, did in snippet, have stick in dbms' datatypes

which brings point: try db-agnostic when can!


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -