sqlite - Rails Migration: Determine what is being used as database -
i trying set autoincrement
value sqlite database using. in future, switching postgresql because deploying heroku , want postgresql local development.
until then, i'm using sqlite. there way can write migration such knows database provider i'm using can have 2 separate execute
statements set autoincement
?
try calling connection.adapter_name in migration. should return either: "postgresql" or "sqlite".
Comments
Post a Comment