mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Отрефакторены тесты
Удалено тестовое окружение acceptance Удалена часть потенциально ненужных тестов Добавлена логика для формы регистрации Добавлена таблица для хранения ключей активации по E-mail Добавлены тесты для формы регистрации Реорганизован роутинг Добавлен компонент для ReCaptcha2
This commit is contained in:
23
console/migrations/m160114_134716_account_email_keys.php
Normal file
23
console/migrations/m160114_134716_account_email_keys.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use console\db\Migration;
|
||||
|
||||
class m160114_134716_account_email_keys extends Migration {
|
||||
|
||||
public function safeUp() {
|
||||
$this->createTable('{{%email_activations}}', [
|
||||
'id' => $this->primaryKey(),
|
||||
'account_id' => $this->getDb()->getTableSchema('{{%accounts}}')->getColumn('id')->dbType . ' NOT NULL',
|
||||
'key' => $this->string()->unique()->notNull(),
|
||||
'type' => $this->smallInteger()->notNull(),
|
||||
'created_at' => $this->integer()->notNull(),
|
||||
], $this->tableOptions);
|
||||
|
||||
$this->addForeignKey('FK_email_activation_to_account', '{{%email_activations}}', 'account_id', '{{%accounts}}', 'id', 'CASCADE', 'CASCADE');
|
||||
}
|
||||
|
||||
public function safeDown() {
|
||||
$this->dropTable('{{%email_activations}}');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user