We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello everyone,
Considering this schema:
Product: type: entity table: products schema: test id: id: type: integer generator: strategy: AUTO fields: name: type: string manyToMany: options: targetEntity: Option joinTable: name: product_option schema: test joinColumns: product_id: referencedColumnName: id inverseJoinColumns: option_id: referencedColumnName: id Option: type: entity table: options schema: test id: id: type: integer generator: strategy: AUTO fields: label: type: string
Create command orm:schema-tool:drop --dump-sql is giving me following sql statements:
orm:schema-tool:drop --dump-sql
CREATE TABLE test__options (id INTEGER NOT NULL, label VARCHAR(255) NOT NULL, PRIMARY KEY(id)); CREATE TABLE test__products (id INTEGER NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)); CREATE TABLE test__product_option (product_id INTEGER NOT NULL, option_id INTEGER NOT NULL, PRIMARY KEY(product_id, option_id), CONSTRAINT FK_F811B85D4584665A FOREIGN KEY (product_id) REFERENCES test__products (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_F811B85DA7C41D6F FOREIGN KEY (option_id) REFERENCES test__options (id) NOT DEFERRABLE INITIALLY IMMEDIATE); CREATE INDEX IDX_F811B85D4584665A ON test__product_option (product_id); CREATE INDEX IDX_F811B85DA7C41D6F ON test__product_option (option_id);
But when I want to drop my schema, many to many relation table is missing in sql statements: orm:schema-tool:drop --dump-sql
DROP TABLE test__options; DROP TABLE test__products
This is happening because DefaultQuoteStrategy::getJoinTableName() does not care about platform which can emulate schema unlike getTableName().
DefaultQuoteStrategy::getJoinTableName()
getTableName()
The text was updated successfully, but these errors were encountered:
Any chance to get that solved? The PR is up for over 3 years now. Happy to help bringing it over the line.
Sorry, something went wrong.
@pamelus I commented on the PR. If you see on activity, you can address my comments yourself.
Can you check if this happens in 2.7.0? #7079 should have solved this.
lcobucci
greg0ire
Successfully merging a pull request may close this issue.
Hello everyone,
Considering this schema:
Create command
orm:schema-tool:drop --dump-sql
is giving me following sql statements:But when I want to drop my schema, many to many relation table is missing in sql statements:
orm:schema-tool:drop --dump-sql
This is happening because
DefaultQuoteStrategy::getJoinTableName()
does not care about platform which can emulate schema unlikegetTableName()
.The text was updated successfully, but these errors were encountered: