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

DDC-629: SchemaTool's method dropSchema, drops all classes instead of those specified in $classes argument #5138

Closed
doctrinebot opened this issue Jun 9, 2010 · 4 comments
Assignees
Labels
Milestone

Comments

@doctrinebot
Copy link

Jira issue originally created by user sammysnake:

$classes = array(
  $this->_em->getClassMetadata('Models\Acl\Role'),
  $this->_em->getClassMetadata('Models\Acl\Resource\Module'),
  $this->_em->getClassMetadata('Models\Acl\Resource\Controller'),
  $this->_em->getClassMetadata('Models\Acl\Resource\Action')
);

// Delete databases
$tool = new \Doctrine\ORM\Tools\SchemaTool($this->_em);
$tool->dropSchema($classes);

Expected:
Drops just schema specified by $classes

Actual:
Drops all schema, not just that specified in $classes

@doctrinebot
Copy link
Author

Comment created by sammysnake:

SchemaTool.php method getDropSchemaSql(array $classes)

doesn't create $schema from $classes argument
$schema = $sm->createSchema();

Additionally in AbstractSchemaManager.php method createSchema() ..

doesn't support creating schema from argument ($classes)

@doctrinebot
Copy link
Author

Comment created by @beberlei:

yeah i think this is a non-issue, but requires better documentation and a disctiction of th etwo different approaches to deleting tables through totally different method names. I will be on this issue :)

@doctrinebot
Copy link
Author

Comment created by @beberlei:

fixed

@doctrinebot
Copy link
Author

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.0-RC1 milestone Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants