嘿,我在google和Laravel文档中到处搜索,我找不到如何将CLOB字段添加到表中。有可能吗?
$table->clob('test'); 不起作用。
发布于 2018-08-13 14:14:44
Laravel的模式管理器并不支持所有列类型。
中长气泡不支持,所以我想cblob也不是
https://github.com/laravel/framework/issues/3544
在迁移中,有一种方法可以实现原始查询DB::语句。
看看这个答案
MediumBlob in Laravel database schema
TL;DR
Schema::create("<table name>", function($table) {
// here you do all columns supported by the schema builder
});
// once the table is created use a raw query to ALTER it and add the MEDIUMBLOB
DB::statement("ALTER TABLE <table name> ADD <column name> MEDIUMBLOB");https://stackoverflow.com/questions/51824304
复制相似问题