在db/migrate
文件夹中添加迁移文件并运行rake db:migrate
后,我想回到上一步,我认为使用VERSION=n
是正确的方法,但我不知道要使用的正确的n值。有什么命令可以检查当前的n值吗?
如果有人能提供关于如何使用rake db:migrate
的完整说明,那就太好了。
发布于 2010-12-04 17:43:36
发布于 2018-07-25 10:07:03
如果版本是20150616132425
,则使用:
rails db:migrate:down VERSION=20150616132425
发布于 2020-10-03 12:45:52
try {
$result=DB::table('users')->whereExists(function ($Query){
$Query->where('id','<','14162756');
$Query->whereBetween('password',[14162756,48384486]);
$Query->whereIn('id',[3,8,12]);
});
}catch (\Exception $error){
Log::error($error);
DB::rollBack(1);
return redirect()->route('bye');
}
https://stackoverflow.com/questions/4352848
复制相似问题