Is there a function that executes mysql? Specifically mysql generated by the CakeSchema?
This is an example of the data I want to import:
$this->Schema = new CakeSchema();
$Schema = $this->Schema->load();
$db = ConnectionManager::getDataSource($this->Schema->connection);
$contents = "\n\n" . $db->createSchema($Schema);
If it’s actually MySQL, then just use query()
Because it likely doesn’t really fit with one of your models, you can always make a “DataFunction” model and tell it to
$useTable = false;… then store any/all of these kind of “general” functions there. Then load the model and call your function from whatever action you’d like.