| @@ 5-24 (lines=20) @@ | ||
| 2 | ||
| 3 | use yii\db\Migration; |
|
| 4 | ||
| 5 | class m161123_152129_add_register_confirm_template extends Migration |
|
| 6 | { |
|
| 7 | public function up() |
|
| 8 | { |
|
| 9 | $this->insert('mail_templates', [ |
|
| 10 | 'key' => 'REGISTER_CONFIRM', |
|
| 11 | 'body' => '<p>Hello, {{name}}!</p>' |
|
| 12 | . '<p>Thank you for registration! To activate your account, click here please {{link}}.</p>' |
|
| 13 | . '<p>After confirmation you will be automatically logged in.</p>', |
|
| 14 | 'updated_at' => date('Y-m-d H:i:s'), |
|
| 15 | 'name' => 'Confirm registration', |
|
| 16 | 'subject' => 'Registration confirmation' |
|
| 17 | ]); |
|
| 18 | } |
|
| 19 | ||
| 20 | public function down() |
|
| 21 | { |
|
| 22 | $this->delete('mail_templates', ['key' => 'REGISTER_CONFIRM']); |
|
| 23 | } |
|
| 24 | } |
|
| 25 | ||
| @@ 5-24 (lines=20) @@ | ||
| 2 | ||
| 3 | use yii\db\Migration; |
|
| 4 | ||
| 5 | class m161129_090146_add_change_password_template extends Migration |
|
| 6 | { |
|
| 7 | public function up() |
|
| 8 | { |
|
| 9 | $this->insert('mail_templates', [ |
|
| 10 | 'key' => 'CHANGE_PASSWORD', |
|
| 11 | 'body' => '<p>Hello, {{name}}!</p>' |
|
| 12 | . '<p>To change your password, click here please {{link}}.</p>' |
|
| 13 | . '<p>After setting new password you will be automatically logged in.</p>', |
|
| 14 | 'updated_at' => date('Y-m-d H:i:s'), |
|
| 15 | 'name' => 'Password recovery', |
|
| 16 | 'subject' => 'Password recovery' |
|
| 17 | ]); |
|
| 18 | } |
|
| 19 | ||
| 20 | public function down() |
|
| 21 | { |
|
| 22 | $this->delete('mail_templates', ['key' => 'CHANGE_PASSWORD']); |
|
| 23 | } |
|
| 24 | } |
|
| 25 | ||
| @@ 5-23 (lines=19) @@ | ||
| 2 | ||
| 3 | use yii\db\Migration; |
|
| 4 | ||
| 5 | class m170127_103353_add_change_password_template extends Migration |
|
| 6 | { |
|
| 7 | public function up() |
|
| 8 | { |
|
| 9 | $this->insert('mail_templates', [ |
|
| 10 | 'key' => 'CHANGE_PASSWORD', |
|
| 11 | 'body' => '<p>Hello, {{name}}!</p>' |
|
| 12 | . '<p>To change your password, click here please {{link}}.</p>', |
|
| 13 | 'updated_at' => date('Y-m-d H:i:s'), |
|
| 14 | 'name' => 'Password changing', |
|
| 15 | 'subject' => 'Password changing' |
|
| 16 | ]); |
|
| 17 | } |
|
| 18 | ||
| 19 | public function down() |
|
| 20 | { |
|
| 21 | $this->delete('mail_templates', ['key' => 'CHANGE_PASSWORD']); |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||