Init SQL

Description

The SQL statements to run to initialize a new database connection immediately after opening it.

This is mainly used for setting some state on the connection that needs to be shared across all scripts, or should not be included into any one script.

Usage

Command line

./migratedb -initSql="ALTER SESSION SET NLS_LANGUAGE='ENGLISH';" info

Configuration File

migratedb.initSql=ALTER SESSION SET NLS_LANGUAGE='ENGLISH';

Environment Variable

MIGRATEDB_INIT_SQL=ALTER SESSION SET NLS_LANGUAGE='ENGLISH';

API

MigrateDb.configure()
    .initSql("ALTER SESSION SET NLS_LANGUAGE='ENGLISH';")
    .load()