我正在使用Liquibase进行数据库人口。具有一个实体定义文件,其字段为:
<column name="image" type="longblob"></column>
和加载数据配置:
<loadData encoding="UTF-8" file="images.csv"
separator=";" tableName="images">
</loadData>
在输入csv文件中,我有3列:1)名称2)类型3)图像
所以我的问题是是否可以在输入文件字段“image”中填充图像的PATH(“/test.png”),并在数据库中将其填充为从 *.cvs路径中提供的BLOB上传图像?
1条答案
按热度按时间lrpiutwd1#
是的,有可能
只需使用CSV文件中图像文件的路径,即可在图像数据列中找到图像文件。
就像这个CSV文件:
你可以这样定义你的liquibase changelog文件: