php - Laravel 迁移工作但没有做任何事情
问题描述
laravel 6.20.29
mysql 14.14
服务器 Linux (Ubuntu 18.04.3 LTS)
在我的一个aws实例中部署我的代码时,所有迁移都执行了,但有些迁移在数据库中什么也没做,没有显示任何错误(仅显示成功消息),尽管在其他实例和本地它都有效,但任何人都曾遇到过任何事情像那样?
迁移之一:
class ModifyDispensacoesTable extends Migration
{
public function up()
{
Schema::table('dispensacoes', function (Blueprint $table) {
$table->integer('estoque_triagem_id')->unsigned()->nullable()->after('produtos_lote_id');
$table->integer('estoque_atendimento_id')->unsigned()->nullable()->after('estoque_triagem_id');
$table->foreign('estoque_triagem_id')->references('id')->on('estoques_triagens');
$table->foreign('estoque_atendimento_id')->references('id')->on('estoques_atendimentos');
});
}
public function down()
{
Schema::table('dispensacoes', function (Blueprint $table) {
$table->dropForeign('dispensacoes_estoque_triagem_id_foreign');
$table->dropColumn('estoque_triagem_id');
$table->dropForeign('dispensacoes_estoque_atendimento_id_foreign');
$table->dropColumn('estoque_atendimento_id');
});
}
}
解决方案
推荐阅读
- jira - 如何通过单击而不是编辑打开图像链接?
- node.js - 与 NodeJS 的承诺
- amazon-web-services - 应用 S3 存储桶策略时访问被拒绝
- db2 - 基于某些标准的 IBM DB2 Timetravel 日志记录
- java - TestNG 错误:无法运行 TestNG,获取对未定义变量surefireArgLine 的引用?
- ruby - Ruby-Squib svg 文件未完全呈现
- peoplesoft - 在 Equation Engine 中编辑提示
- d3.js - 缺少 D3js 第一个刻度标签
- reactjs - 反应组件目录的命名约定
- c# - 在我的屏幕顶部打开时的 C# Chrome 驱动程序