db icon indicating copy to clipboard operation
db copied to clipboard

Add posibility to drop table `IF EXISTS` and `CASCADE`

Open Tigrov opened this issue 7 months ago • 0 comments

Add two options for dropping a table

  1. IF EXISTS - drop table only if it exists
  2. CASCADE - drop also dependencies cascade

Suggestions for QueryBuilderInterface::dropTable()

  • Change argument string $table to array|string $tables and realize method for list of tables;
  • Add second argument $cascade = false and generate SQL query to drop tables and dependencies cascade;
  • Add new method QueryBuilderInterface::dropTableIfExists() with the same agruments and generate SQL query with IF EXISTS construction.

Tigrov avatar Nov 10 '23 08:11 Tigrov