Newer
Older
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* @category CategoryName
* @author Elite Division S.r.l.
*/
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* Class m171204_135754_create_table_videoconf_users_mm
*/
class m171204_135754_create_table_videoconf_users_mm extends AmosMigrationTableCreation
{
/**
* @inheritdoc
*/
protected function setTableName()
{
$this->tableName = '{{%videoconf_users_mm}}';
}
/**
* @inheritdoc
*/
protected function setTableFields()
{
$this->tableFields = [
'id' => $this->primaryKey(),
'videoconf_id' => $this->integer()->notNull(),
'user_profile_id' => $this->integer()->notNull()
];
}
/**
* @inheritdoc
*/
protected function beforeTableCreation()
{
parent::beforeTableCreation();
$this->setAddCreatedUpdatedFields(true);
}
/**
* @inheritdoc
*/
protected function addForeignKeys()
{
$this->addForeignKey('fk_videoconf_users_mm', $this->getRawTableName(), 'videoconf_id', '{{%videoconf}}', 'id');
$this->addForeignKey('fk_users_videoconf_mm', $this->getRawTableName(), 'user_profile_id', '{{%user_profile}}', 'id');
}
}