Skip to content

* Fix bug on text fields size (should be longtext)#37

Merged
nterms merged 1 commit intonterms:masterfrom
macklus:master
May 14, 2017
Merged

* Fix bug on text fields size (should be longtext)#37
nterms merged 1 commit intonterms:masterfrom
macklus:master

Conversation

@macklus
Copy link
Copy Markdown
Contributor

@macklus macklus commented May 10, 2017

this PR change all related text fields on database who can get trouble if you wrote a big email.
also, it fix #36

@nterms nterms merged commit 9c53e27 into nterms:master May 14, 2017
@thyseus
Copy link
Copy Markdown

thyseus commented May 30, 2017

+1 for the bugfix - i also ran into the problem with the wrong column datatype.

But there are no columns 'html_body' and 'html_text'. This migration does not work on my system:

*** applying m170510_063111_alter_text_fields
    > alter column html_body in table {{%mail_queue}} to LONGTEXT ...Exception: SQLSTATE[42S22]: Column n
ot found: 1054 Unknown column 'html_body' in 'mail_queue'
The SQL being executed was: ALTER TABLE `mail_queue` CHANGE `html_body` `html_body` LONGTEXT (C:\xampp\ht
docs\hydra\vendor\yiisoft\yii2\db\Schema.php:636)
#0 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\db\Command.php(856): yii\db\Schema->convertException(Object(
PDOException), 'ALTER TABLE `ma...')
#1 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\db\Migration.php(378): yii\db\Command->execute()
#2 C:\xampp\htdocs\hydra\vendor\nterms\yii2-mailqueue\migrations\m170510_063111_alter_text_fields.php(11)
: yii\db\Migration->alterColumn('{{%mail_queue}}', 'html_body', 'LONGTEXT')
#3 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\db\Migration.php(96): m170510_063111_alter_text_fields->safe
Up()
#4 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(654): yii\db\M
igration->up()
#5 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(166): yii\cons
ole\controllers\BaseMigrateController->migrateUp('m170510_063111_...')
#6 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#7 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array
)
#8 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\base\Controller.php(156): yii\base\InlineAction->runWithPara
ms(Array)
#9 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\console\Controller.php(128): yii\base\Controller->runAction(
'up', Array)
#10 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\base\Module.php(523): yii\console\Controller->runAction('up
', Array)
#11 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\console\Application.php(180): yii\base\Module->runAction('m
igrate/up', Array)
#12 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\console\Application.php(147): yii\console\Application->runA
ction('migrate/up', Array)
#13 C:\xampp\htdocs\hydra\vendor\yiisoft\yii2\base\Application.php(380): yii\console\Application->handleR
equest(Object(yii\console\Request))
#14 C:\xampp\htdocs\hydra\yii(20): yii\base\Application->run()
#15 {main}
*** failed to apply m170510_063111_alter_text_fields (time: 0.004s)

This migration does remove the columns:

https://github.com/nterms/yii2-mailqueue/blob/master/migrations/m170217_124201_drop_obsolete_columns_from_mail_queue_table.php

are you sure this is working as expected? @macklus @nterms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Database: mail_queue: swift_message column should be LONGTEXT

3 participants