m180220_172009_create_call_table.php
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
<?php
use yii\db\Migration;
/**
* Class m180203_131720_call_table
*/
class m180220_172009_create_call_table extends Migration
{
/**
* @inheritdoc
*/
public function safeUp()
{
$this->createTable(
'call',
[
'id' => $this->primaryKey(),
'company' => $this->string()
->notNull(),
'calldate' => 'timestamp NOT NULL',
'callerid' => $this->string()
->notNull(),
'line' => $this->string(),
'operator' => $this->string(),
'status' => $this->string()
->notNull(),
'queue' => $this->string(),
'duration' => $this->integer()
->notNull(),
'billsec' => $this->integer()
->notNull(),
'record' => $this->string(),
]
);
}
/**
* @inheritdoc
*/
public function safeDown()
{
$this->dropTable('call');
}
}