DDC-269: CLI throws Exception that table already exists if --dump-sql specified #337

Closed
opened 2026-01-22 12:35:11 +01:00 by admin · 6 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 23, 2010).

Jira issue originally created by user shurakai:

If I execute

./doctrine orm:schema-tool --create --trace --dump-sql

I recieve an Exception stating that one of the tables already exists, but I only want to dump the SQL and not have it executed (in which case this exception would be okay)

Originally created by @doctrinebot on GitHub (Jan 23, 2010). Jira issue originally created by user shurakai: If I execute ./doctrine orm:schema-tool --create --trace --dump-sql I recieve an Exception stating that one of the tables already exists, but I only want to dump the SQL and not have it executed (in which case this exception would be okay)
admin added the Bug label 2026-01-22 12:35:11 +01:00
admin closed this issue 2026-01-22 12:35:11 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 23, 2010):

@doctrinebot commented on GitHub (Jan 23, 2010): - depends on [DDC-15: Add support to --force option in SchemaTool CLI Task](http://www.doctrine-project.org/jira/browse/DDC-15)
Author
Owner

@doctrinebot commented on GitHub (Jan 23, 2010):

Comment created by @beberlei:

Can you post the stack trace please?

@doctrinebot commented on GitHub (Jan 23, 2010): Comment created by @beberlei: Can you post the stack trace please?
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2010):

Comment created by shurakai:

orm:schema-tool => The table with name 'core*content*directories' already exists.


#0 /var/workspaces/DoctrineTrunk/lib/Doctrine/DBAL/Schema/Schema.php(89): Doctrine\DBAL\Schema\SchemaException::tableAlreadyExists('core*content*di...')
#1 /var/workspaces/DoctrineTrunk/lib/Doctrine/DBAL/Schema/Schema.php(185): Doctrine\DBAL\Schema\Schema->_addTable(Object(Doctrine\DBAL\Schema\Table))
#2 /var/workspaces/DoctrineTrunk/lib/Doctrine/ORM/Tools/SchemaTool.php(120): Doctrine\DBAL\Schema\Schema->createTable('core*content*di...')
#3 /var/workspaces/DoctrineTrunk/lib/Doctrine/ORM/Tools/SchemaTool.php(98): Doctrine\ORM\Tools\SchemaTool->getSchemaFromMetadata(Array)
#4 /var/workspaces/DoctrineTrunk/lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php(200): Doctrine\ORM\Tools\SchemaTool->getCreateSchemaSql(Array)
#5 /var/workspaces/DoctrineTrunk/lib/Doctrine/Common/Cli/TaskNamespace.php(229): Doctrine\ORM\Tools\Cli\Tasks\SchemaToolTask->run()
#6 /var/workspaces/DoctrineTrunk/lib/Doctrine/Common/Cli/CliController.php(170): Doctrine\Common\Cli\TaskNamespace->runTask('schema-tool', Array)
#7 /var/workspaces/DoctrineTrunk/lib/Doctrine/Common/Cli/CliController.php(137): Doctrine\Common\Cli\CliController->runTask('orm:schema-tool', Array)
#8 /var/workspaces/DoctrineTrunk/tools/sandbox/doctrine.php(12): Doctrine\Common\Cli\CliController->run(Array)
#9 /var/workspaces/DoctrineTrunk/tools/sandbox/doctrine(4): include('/var/workspaces...')
#10 {main}
@doctrinebot commented on GitHub (Jan 24, 2010): Comment created by shurakai: ``` orm:schema-tool => The table with name 'core*content*directories' already exists. #0 /var/workspaces/DoctrineTrunk/lib/Doctrine/DBAL/Schema/Schema.php(89): Doctrine\DBAL\Schema\SchemaException::tableAlreadyExists('core*content*di...') #1 /var/workspaces/DoctrineTrunk/lib/Doctrine/DBAL/Schema/Schema.php(185): Doctrine\DBAL\Schema\Schema->_addTable(Object(Doctrine\DBAL\Schema\Table)) #2 /var/workspaces/DoctrineTrunk/lib/Doctrine/ORM/Tools/SchemaTool.php(120): Doctrine\DBAL\Schema\Schema->createTable('core*content*di...') #3 /var/workspaces/DoctrineTrunk/lib/Doctrine/ORM/Tools/SchemaTool.php(98): Doctrine\ORM\Tools\SchemaTool->getSchemaFromMetadata(Array) #4 /var/workspaces/DoctrineTrunk/lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php(200): Doctrine\ORM\Tools\SchemaTool->getCreateSchemaSql(Array) #5 /var/workspaces/DoctrineTrunk/lib/Doctrine/Common/Cli/TaskNamespace.php(229): Doctrine\ORM\Tools\Cli\Tasks\SchemaToolTask->run() #6 /var/workspaces/DoctrineTrunk/lib/Doctrine/Common/Cli/CliController.php(170): Doctrine\Common\Cli\TaskNamespace->runTask('schema-tool', Array) #7 /var/workspaces/DoctrineTrunk/lib/Doctrine/Common/Cli/CliController.php(137): Doctrine\Common\Cli\CliController->runTask('orm:schema-tool', Array) #8 /var/workspaces/DoctrineTrunk/tools/sandbox/doctrine.php(12): Doctrine\Common\Cli\CliController->run(Array) #9 /var/workspaces/DoctrineTrunk/tools/sandbox/doctrine(4): include('/var/workspaces...') #10 {main} ```
Author
Owner

@doctrinebot commented on GitHub (Jan 25, 2010):

Comment created by @guilhermeblanco:

DDC-15 points to the same issue.

@doctrinebot commented on GitHub (Jan 25, 2010): Comment created by @guilhermeblanco: [DDC-15](http://www.doctrine-project.org/jira/browse/DDC-15) points to the same issue.
Author
Owner

@doctrinebot commented on GitHub (Jan 25, 2010):

Comment created by @guilhermeblanco:

Closing this issue since it's duplicated with DDC-15.

@doctrinebot commented on GitHub (Jan 25, 2010): Comment created by @guilhermeblanco: Closing this issue since it's duplicated with [DDC-15](http://www.doctrine-project.org/jira/browse/DDC-15).
Author
Owner

@doctrinebot commented on GitHub (Jan 25, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jan 25, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#337