Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 长时间运行的Rails迁移步骤不';我好像没做完_Mysql_Rake_Rails Migrations - Fatal编程技术网

Mysql 长时间运行的Rails迁移步骤不';我好像没做完

Mysql 长时间运行的Rails迁移步骤不';我好像没做完,mysql,rake,rails-migrations,Mysql,Rake,Rails Migrations,我已经设置了一些rake迁移。我正在修改的一个表有几十万行,数据长度为1962754048字节(本质上是一个2GB的表)。这是一个InnoDB表。我通过rake向表中添加了几列 不幸的是,change\u table步骤从未“完成”。在后端运行的查询已完成,但rake步骤似乎从未向前推进 有什么建议吗?可能与索引问题有关 我会尝试将您的迁移分为: Drop all indexes (you can do this in mysql if you want, might be easier).

我已经设置了一些rake迁移。我正在修改的一个表有几十万行,数据长度为1962754048字节(本质上是一个2GB的表)。这是一个InnoDB表。我通过rake向表中添加了几列

不幸的是,
change\u table
步骤从未“完成”。在后端运行的查询已完成,但rake步骤似乎从未向前推进


有什么建议吗?

可能与索引问题有关

我会尝试将您的迁移分为:

Drop all indexes (you can do this in mysql if you want, might be easier).

Add the new columns

Add all required indexes back (If you did this in mysql, do that again, if you dropped the indexes through migrations, add them back thru migrations).

它可能有助于和/或有助于查明问题所在。

它可能与索引问题有关

我会尝试将您的迁移分为:

Drop all indexes (you can do this in mysql if you want, might be easier).

Add the new columns

Add all required indexes back (If you did this in mysql, do that again, if you dropped the indexes through migrations, add them back thru migrations).
这可能有助于和/或有助于查明问题所在