/** * Extends dropTable to drop also the main sequence. * @param string $table table name * @param bool $drop_sequence if there's a sequence to be dropped too. defaults to TRUE. */ public function dropTable($table, $drop_sequence = true) { if ($drop_sequence) { $this->execute("DROP SEQUENCE SQ_{$table}"); } $result = parent::dropTable($table); return $result; }
/** * @param string $commentableTableName * @param CDbMigration $migration */ public static function dropTables($rateableTableName, $migration) { $migration->dropTable($rateableTableName . '_rate'); }