public function safeUp() { $table = new Postmaster_NotificationSentRecord(); $this->addColumnAfter($table->getTableName(), 'senderId', ColumnType::Int, 'notificationId'); return true; }
public function getSentNotifications() { $record = new Postmaster_NotificationSentRecord(); $query = craft()->db->createCommand()->select('*, count(dateCreated) count')->from($record->getTableName())->group('dateCreated'); return $query->queryAll(); }