Hello @twisted1919 bro , I have just reposted. Ticket ID "[#MZ4AV4N-]"@Kollydaton - can you repost in the support ticket, i am not sure which one is it.
Thanks.
[ADD] - #14 - New command to delete old records from various tables
Hi, I got same error too while upgrading.Hi, while upgrading its giving me an error
Its giving me same error uupgrading from command line
- Updating to version 1.3.6.1 failed with: CDbCommand failed to execute the SQL statement: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'must_confirm_delivery'
Also after droping that perticular table, its again gives the same error
Please help, unfortunately i dont have backup with me, as sql file dosent get downloaded properly
@twisted1919 It would be really nice if MW can show how many duplicate emails (if any) are there in a list when uploaded. Suppose I import a list of 10K subs and 5K are duplicates, MW tells 10K subs are imported at the end, but actually only 5K will be imported. So the counts may be confusing
How is this done (I was hoping to find a function to delete old delivery logs)
php -q /path/to/apps/console/console.php table-cleaner --table=mw_campaign_delivery_logs --time="-6 months"
@twisted1919 ...Noted!!!.... Thanks brother@Shailendra Jha - you shouldn't drop the database table... If the upgrade tool says there's a duplicate column, this usually means you tried the upgrade from web interface, it failed, then tried again from command line, and since the web interface upgrade managed to run for a while and do some things, now the command line tries to do the same and ends up with the given error.
However, things are not lost. if this happens, look in /apps/common/data/update-sql for the version file that failed the upgrade. in this case 1.3.6.1.sql, open it and remove the line that causes the issue (if you don't know the line, remove first line) save the file and try the update tool once again. If still errors out, remove the next line from the sql file, save it and try again, and do like so till the error doesn't show up. Once the upgrade is done, paste back the removed lines from the sql file and save the file.
@Kollydaton ^ above applies to you too
This will delete records older than 6 months. The --time param accepts any expression usable by php's strtotime() function.Code:php -q /path/to/apps/console/console.php table-cleaner --table=mw_campaign_delivery_logs --time="-6 months"
@Shailendra Jha - you shouldn't drop the database table... If the upgrade tool says there's a duplicate column, this usually means you tried the upgrade from web interface, it failed, then tried again from command line, and since the web interface upgrade managed to run for a while and do some things, now the command line tries to do the same and ends up with the given error.
However, things are not lost. if this happens, look in /apps/common/data/update-sql for the version file that failed the upgrade. in this case 1.3.6.1.sql, open it and remove the line that causes the issue (if you don't know the line, remove first line) save the file and try the update tool once again. If still errors out, remove the next line from the sql file, save it and try again, and do like so till the error doesn't show up. Once the upgrade is done, paste back the removed lines from the sql file and save the file.
@Kollydaton ^ above applies to you too
This will delete records older than 6 months. The --time param accepts any expression usable by php's strtotime() function.Code:php -q /path/to/apps/console/console.php table-cleaner --table=mw_campaign_delivery_logs --time="-6 months"
Not sure if you can sort the csv like that, since it usually contains more than just the email addresses...@frm.mwz I would rather issue "cat csv|sort|uniq" to work around . But I'm worried about those guys who wake me up in the early morning only to ask where did their 5K emails go . If there was such an option, there would have been no room for doubts. Thanks for your help anyway
Would be really good to be able to get rid of log files, but keep the stats separately, perhaps in an extra database? Basically all that could slow down sending, could it be put into an extra dbf?@VVT - Yeah it will affect statistics. You can, from command line, run the campaign archive campaigns, to archive campaigns logs if you want to keep them, however, that is a very tricky command that can fail in many ways.
We can sort them.. any method is fine. When we open our app to public, we can expect ppl of various knowledge levels. I've educated ppl what a csv file is, trust me. Today what happened is, one guy downloaded the same list two times and merged them in excel manually. Then he uploaded it to a new list. If he was wise enough to sort and find the unique's, he would have merged those lists in MW itself . So, after the upload , MW showed that 10K emails were imported (or finished, something like that but no errors). I thought MW has this functionality cuz Interspire had it and that is what I used in the past. Anyway we're doing the duplicate validation, if we can show that count as well, then things would be clearer.Not sure if you can sort the csv like that, since it usually contains more than just the email addresses...
Are there really people who give you an import list with 50% duplicates? What are they smoking? If this had to go through cleaning, it would cost them, hence they would avoid it...
That is why we have the campaign-archive command, to move the logs in another table, as an archive and clear up the main tablebut keep the stats separately, perhaps in an extra database?
That is why we have the campaign-archive command, to move the logs in another table, as an archive and clear up the main table
Updating from 1.3.6 to 1.3.6.2
Error :
Updating to version 1.3.6.2 failed with: CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IGNORE TABLE `mw_campaign_bounce_log` ADD UNIQUE KEY `cid_sid` (`campaign_id`, `' at line 1
-bash: Updating: command not found
-bash: check: command not found
/usr/bin/php /var/www/html/apps/console/console.php update
SET SESSION old_alter_table=1;
ALTER TABLE `campaign_bounce_log` ADD UNIQUE KEY `cid_sid` (`campaign_id`, `subscriber_id`);
SET SESSION old_alter_table=0;