
Yii
24
Вклад в тег
const DB_TABLE = '{{%product}}';
public function up()
{
if (Yii::$app->db->schema->getTableSchema(self::DB_TABLE, true) === null) {
$this->createTable(self::DB_TABLE, [
'id' => 'int(11) NOT NULL AUTO_INCREMENT COMMENT "Идентификатор"',
.............................
'PRIMARY KEY (id)',
], 'ENGINE=InnoDB DEFAULT CHARSET=utf8');
}
}