001package io.ebean.datasource;
002
003import java.sql.Connection;
004import java.sql.SQLException;
005
006/**
007 * Run database initialisation when a pool can't create the initial connections (user may not exist).
008 */
009public interface InitDatabase {
010
011  /**
012   * Execute some database initialisation statements on a database where the user may not exist.
013   *
014   * @param connection Connection obtained using the ownerUsername and ownerPassword.
015   * @param config     The datasource configuration.
016   */
017  void run(Connection connection, DataSourceConfig config) throws SQLException;
018}