-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMigration_Example.php
49 lines (38 loc) · 970 Bytes
/
Migration_Example.php
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
46
47
48
49
<?php
use yii\db\Migration;
class m170326_150729_create_kategorie extends Migration
{
public function safeUp()
{
$this->createTable('kategorie', [
'id' => $this->primaryKey(),
'description' => $this->string(),
'field2' => $this->string(),
'field3' => $this->string(),
],'CHARACTER SET utf8');
//1
$this->insert('kategorie', [
'description' => 'In Office Bleaching',
],'CHARACTER SET utf8');
//2
$this->insert('kategorie', [
'description' => 'Home Bleaching',
],'CHARACTER SET utf8');
//3
$this->insert('kategorie', [
'description' => 'Zahnspange',
],'CHARACTER SET utf8');
//4
$this->insert('kategorie', [
'description' => 'Zahnschmuck',
],'CHARACTER SET utf8');
//5
$this->insert('kategorie', [
'description' => 'Zahnästhetik',
],'CHARACTER SET utf8');
}
public function safeDown()
{
$this->dropTable('kategorie');
}
}