Laravel 5.3 Schema :: create ENUM字段为VARCHAR [英] Laravel 5.3 Schema::create ENUM field is VARCHAR
本文介绍了Laravel 5.3 Schema :: create ENUM字段为VARCHAR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚创建了新的迁移.运行它后,我看到我的字段 type
不是ENUM type .它具有 VARCHAR(255)类型
I just created fresh migration. After running it I see my field type
not ENUM type. It has a VARCHAR(255) type instead
Schema::create('payments', function (Blueprint $table) {
$table->increments('id');
$table->text('response');
$table->enum('type', ['apple', 'paypal']);
$table->smallInteger('flags');
$table->timestamps();
});
有人可以告诉我原因吗?我是否缺少某些东西,我尝试了多次-获得相同的结果.
Can somebody tell me what can be the reason. Am I missing something, I tried multiple times - getting same result.
我正在使用PostgreSQL 9.5.4
I'm using PostgreSQL 9.5.4
推荐答案
查看全文