Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-9617: Fixed DB schema reinstallation #485

Open
wants to merge 6 commits into
base: 4.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$schemaManager = $this->connection->getSchemaManager();
if (!empty($schemaManager->listTables())) {
$io = new SymfonyStyle($input, $output);
if (!$io->confirm('Running this command will delete data in all Ibexa generated tables. Continue?', )) {
if (!$io->confirm('Running this command will delete data in all Ibexa generated tables. Continue?', false)) {
return 0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/RepositoryInstaller/Installer/CoreInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected function getDropSqlStatementsForExistingSchema(
AbstractPlatform $databasePlatform
): array {
$existingSchema = $this->db->getSchemaManager()->createSchema();
$statements = [];
$statements = ['SET FOREIGN_KEY_CHECKS=0'];
// reverse table order for clean-up (due to FKs)
$tables = array_reverse($newSchema->getTables());
// cleanup pre-existing database
Expand Down
Loading