diff --git a/lib/Doctrine/Export.php b/lib/Doctrine/Export.php index 4bcb59396..4213b02bf 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -127,20 +127,9 @@ class Doctrine_Export extends Doctrine_Connection_Module public function dropConstraint($table, $name, $primary = false) { $table = $this->conn->quoteIdentifier($table); - $name = $this->conn->quoteIdentifier($name); + $name = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name)); return $this->conn->exec('ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $name); } - /** - * drop existing foreign key - * - * @param string $table name of table that should be used in method - * @param string $name name of the foreign key to be dropped - * @return void - */ - public function dropForeignKey($table, $name) - { - return $this->dropConstraint($table, $name); - } /** * dropSequenceSql * drop existing sequence @@ -1000,9 +989,9 @@ class Doctrine_Export extends Doctrine_Connection_Module public function exportSchema($directory = null) { if ($directory !== null) { - $models = Doctrine_Facade::loadModels($directory); + $models = Doctrine::loadModels($directory); } else { - $models = Doctrine_Facade::getLoadedModels(); + $models = Doctrine::getLoadedModels(); } $this->exportClasses($models); @@ -1080,7 +1069,7 @@ class Doctrine_Export extends Doctrine_Connection_Module */ public function exportClassesSql(array $classes) { - $models = Doctrine_Facade::getLoadedModels($classes); + $models = Doctrine::getLoadedModels($classes); $sql = array(); @@ -1159,9 +1148,9 @@ class Doctrine_Export extends Doctrine_Connection_Module public function exportSql($directory = null) { if ($directory !== null) { - $models = Doctrine_Facade::loadModels($directory); + $models = Doctrine::loadModels($directory); } else { - $models = Doctrine_Facade::getLoadedModels(); + $models = Doctrine::getLoadedModels(); } return $this->exportClassesSql($models); diff --git a/lib/Doctrine/Task/GenerateYamlFromDb.php b/lib/Doctrine/Task/GenerateYamlFromDb.php index 3807c2642..d56e53378 100644 --- a/lib/Doctrine/Task/GenerateYamlFromDb.php +++ b/lib/Doctrine/Task/GenerateYamlFromDb.php @@ -38,6 +38,6 @@ class Doctrine_Task_GenerateYamlFromDb extends Doctrine_Task public function execute() { - Doctrine_Facade::generateYamlFromDb($this->getArgument('yaml_schema_path')); + Doctrine::generateYamlFromDb($this->getArgument('yaml_schema_path')); } } \ No newline at end of file diff --git a/lib/Doctrine/Task/GenerateYamlFromModels.php b/lib/Doctrine/Task/GenerateYamlFromModels.php index f9059afd9..0f045985c 100644 --- a/lib/Doctrine/Task/GenerateYamlFromModels.php +++ b/lib/Doctrine/Task/GenerateYamlFromModels.php @@ -39,6 +39,6 @@ class Doctrine_Task_GenerateYamlFromModels extends Doctrine_Task public function execute() { - Doctrine_Facade::generateYamlFromModels($this->getArgument('yaml_schema_path'), $this->getArgument('models_path')); + Doctrine::generateYamlFromModels($this->getArgument('yaml_schema_path'), $this->getArgument('models_path')); } } \ No newline at end of file diff --git a/lib/Doctrine/Task/LoadData.php b/lib/Doctrine/Task/LoadData.php index 31f653299..b1222d3ac 100644 --- a/lib/Doctrine/Task/LoadData.php +++ b/lib/Doctrine/Task/LoadData.php @@ -39,7 +39,7 @@ class Doctrine_Task_LoadData extends Doctrine_Task public function execute() { - Doctrine_Facade::loadModels($this->getArgument('models_path')); - Doctrine_Facade::loadData($this->getArgument('data_fixtures_path')); + Doctrine::loadModels($this->getArgument('models_path')); + Doctrine::loadData($this->getArgument('data_fixtures_path')); } } \ No newline at end of file diff --git a/lib/Doctrine/Task/LoadDummyData.php b/lib/Doctrine/Task/LoadDummyData.php index 84523a32a..15b2e7fac 100644 --- a/lib/Doctrine/Task/LoadDummyData.php +++ b/lib/Doctrine/Task/LoadDummyData.php @@ -39,7 +39,7 @@ class Doctrine_Task_LoadDummyData extends Doctrine_Task public function execute() { - Doctrine_Facade::loadModels($this->getArgument('models_path')); - Doctrine_Facade::loadDummyData($this->getArgument('append') ? true:false, $this->getArgument('num') ? $this->getArgument('num'):5); + Doctrine::loadModels($this->getArgument('models_path')); + Doctrine::loadDummyData($this->getArgument('append') ? true:false, $this->getArgument('num') ? $this->getArgument('num'):5); } } \ No newline at end of file diff --git a/lib/Doctrine/Task/Migrate.php b/lib/Doctrine/Task/Migrate.php index 27d38f8ac..d2fdaedd1 100644 --- a/lib/Doctrine/Task/Migrate.php +++ b/lib/Doctrine/Task/Migrate.php @@ -38,6 +38,6 @@ class Doctrine_Task_Migrate extends Doctrine_Task public function execute() { - Doctrine_Facade::migrate($this->getArgument('version')); + Doctrine::migrate($this->getArgument('version')); } } \ No newline at end of file