/**
  * Builds the DB and creates a file indicating
  * that the DB has been built at least once.
  *
  * @return void
  */
 protected function rebuildDatabase()
 {
     $this->populator->populate();
     $path = $this->buildIndicator->getPathname();
     $content = 'Initial Build: ' . date('Y-m-d H:i:s');
     $this->filesystem->remove($path);
     $this->filesystem->dumpFile($path, $content);
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $output->writeln('Building database...');
     $this->populator->populate();
     $output->writeln('<fg=green>Done!</fg=green>');
 }