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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -