public function __construct(Version $version) { $this->configuration = $version->getConfiguration(); $this->outputWriter = $this->configuration->getOutputWriter(); $this->connection = $this->configuration->getConnection(); $this->connection = $this->connection->selectDatabase($this->configuration->getMigrationsDatabaseName()); $this->version = $version; }
public function __construct(Configuration $configuration, $version, $class) { $this->configuration = $configuration; $this->outputWriter = $configuration->getOutputWriter(); $this->class = $class; $this->connection = $configuration->getConnection(); $this->db = $configuration->getDatabase(); $this->migration = $this->createMigration(); $this->version = $version; }