Skip to content
代码片段 群组 项目
未验证 提交 88ca73af 编辑于 作者: Stan Hu's avatar Stan Hu
浏览文件

Fix code reloading problems with custom database types

As described in https://github.com/rails/rails/issues/27337,
registering a custom, autoloaded `ActiveRecord::Type` in an
initializer is not safe for code reloading. Previously when
`Gitlab::Database::Type::IndifferentJsonb` was registered in the
ActiveRecord the registry and code reloading occurred, a `TypeError`
would occur because the registry had an old reference.

Let's avoid this code reloading issue by not using the ActiveRecord
registry and instantiate the types explicitly.

Relates to
https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues/2051

Changelog: fixed
上级 34d8f2a9
加载中
显示
21 个添加24 个删除
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册