1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* m180615_170522_oauthClients.php |
4
|
|
|
* |
5
|
|
|
* PHP version 5.6+ |
6
|
|
|
* |
7
|
|
|
* Create applicants |
8
|
|
|
* |
9
|
|
|
* @author Maxime Deschamps <[email protected]> |
10
|
|
|
* @copyright 2010-2018 Ibitux |
11
|
|
|
* @license http://www.ibitux.com/license license |
12
|
|
|
* @version XXX |
13
|
|
|
* @link http://www.ibitux.com |
14
|
|
|
* @package src\migrations |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
use yii\db\Migration; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Class m180615_170522_oauthClients |
21
|
|
|
* |
22
|
|
|
* @author Maxime Deschamps <[email protected]> |
23
|
|
|
* @copyright 2010-2018 Ibitux |
24
|
|
|
* @license http://www.ibitux.com/license license |
25
|
|
|
* @version XXX |
26
|
|
|
* @link http://www.ibitux.com |
27
|
|
|
* @package src\migrations |
28
|
|
|
* @since XXX |
29
|
|
|
*/ |
30
|
|
|
class m180615_170522_oauthClients extends Migration |
|
|
|
|
31
|
|
|
{ |
32
|
|
|
/** |
33
|
|
|
* @inheritdoc |
34
|
|
|
*/ |
35
|
|
|
public function safeUp() |
36
|
|
|
{ |
37
|
|
|
$this->createTable('{{%oauthClients}}', [ |
38
|
|
|
'id' => $this->string(255), |
39
|
|
|
'secret' => $this->string(255), |
40
|
|
|
'isPublic' => $this->boolean(), |
41
|
|
|
'redirectUri' => $this->string(255), |
42
|
|
|
'userId' => $this->string(255), |
43
|
|
|
'name' => $this->string(255), |
44
|
|
|
'dateCreated' => $this->datetime(), |
45
|
|
|
'dateUpdated' => $this->datetime(), |
46
|
|
|
'dateDeleted' => $this->dateTime(), |
47
|
|
|
'PRIMARY KEY(id)', |
48
|
|
|
], 'ENGINE=InnoDB DEFAULT CHARSET=utf8'); |
49
|
|
|
return true; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @inheritdoc |
54
|
|
|
*/ |
55
|
|
|
public function safeDown() |
56
|
|
|
{ |
57
|
|
|
$this->dropTable('{{%oauthClients}}'); |
58
|
|
|
return true; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
} |
62
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.