Actions
Feature #83020
closedQueryBuilder needs CREATE TABLE, INSERT and DROP TABLE
Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2017-11-17
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
Sometimes it's necessary to dynamically create or drop tables inside an extension or module. For example if you would like to create a backup-table of "pages", before doing some stuff with it.
As I write this, QueryBuilder isn't able to do this. It would be really great, if you can add those methods!
I would like to do things like
public function backupDatabaseTablePages(){
$query = "DROP TABLE `pages_backup`;";
$this->db->sql_query($query);
$query = "CREATE TABLE pages_backup LIKE pages;";
$this->db->sql_query($query);
$query = "INSERT INTO pages_backup SELECT * FROM pages;";
$this->db->sql_query($query);
}
Thanks a lot
Johannes
Actions