简体   繁体   English

如何使用Laravel迁移在sqlite中的另一列之后添加列?

[英]How to add a column after another column in sqlite using Laravel migrations?

Is there a method in Laravel 5.4 to add a column after/before another column inside a sqlite table? Laravel 5.4中是否有一种方法在sqlite表中的另一列之后/之前添加一列? Like after('column') for MySql? 像MySQL的after('column')一样吗?

Why I'm in a hurry is because whenever I tried to rename a column using Laravel migration, it jumps and stick to the last / end of a table! 我之所以着急,是因为每当我尝试使用Laravel迁移来重命名列时,它都会跳转并停留在表的最后/结尾!

Is there a way to get rid out of this? 有办法摆脱这种情况吗?

Short answer: no. 简短的回答:不。

However there is apparently a workaround: 但是,显然有一种解决方法:

Insert new column into table in sqlite? 在sqlite的表中插入新列?

Disclaimer: I rarely use sqlite and cannot verify this works. 免责声明:我很少使用sqlite,因此无法验证它是否有效。 Good luck. 祝好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM