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
IF EXISTS
CASCADE
Add two options for dropping a table
QueryBuilderInterface::dropTable()
string $table
array|string $tables
$cascade = false
QueryBuilderInterface::dropTableIfExists()
The text was updated successfully, but these errors were encountered:
$ifExists
$cascade
dropTable()
MSSQL is not supported CASCADE option: https://learn.microsoft.com/sql/t-sql/statements/drop-table-transact-sql?view=sql-server-ver16
Should we throw exception when $cascade is true in MSSQL? Or we need to use tricks, for example: https://stackoverflow.com/a/4858773?
Sorry, something went wrong.
In cases when DBMS does not support functionality we use complex queries like https://github.com/yiisoft/db-mssql/blob/eb4e5ef9eb7de1fb340b9c4bb894f921d4cad882/src/DDLQueryBuilder.php#L237
Successfully merging a pull request may close this issue.
Add two options for dropping a table
IF EXISTS
- drop table only if it existsCASCADE
- drop also dependencies cascadeSuggestions for
QueryBuilderInterface::dropTable()
string $table
toarray|string $tables
and realize method for list of tables;$cascade = false
and generate SQL query to drop tables and dependencies cascade;QueryBuilderInterface::dropTableIfExists()
with the same agruments and generate SQL query withIF EXISTS
construction.The text was updated successfully, but these errors were encountered: