Sequel 迁移:未初始化的常量 Jsonb (NameError)
Sequel Migration: uninitialized constant Jsonb (NameError)
我正在使用 Sequel with Padrino 并且以下迁移引发了 uninitialized constant Jsonb (NameError)
错误:
Sequel.migration do
up do
alter_table :same_table do
add_column :not_working, Jsonb
end
end
end
销售 create_table
迁移 table 使用 Jsonb 没有问题:
Sequel.migration do
up do
create_table :same_table do
Jsonb :worked
end
end
end
根据Sequel
source code,列类型不应大写。一般来说,DSL 是关于定义 class 方法,而不是常量。
Sequel.migration do
up do
alter_table :same_table do
# ⇓⇓ NOTE SYMBOL
add_column :not_working, :jsonb
end
end
end
Sequel.migration do
up do
create_table :same_table do
# ⇓ NOTE DOWNCASE
jsonb :worked
end
end
end
我正在使用 Sequel with Padrino 并且以下迁移引发了 uninitialized constant Jsonb (NameError)
错误:
Sequel.migration do
up do
alter_table :same_table do
add_column :not_working, Jsonb
end
end
end
销售 create_table
迁移 table 使用 Jsonb 没有问题:
Sequel.migration do
up do
create_table :same_table do
Jsonb :worked
end
end
end
根据Sequel
source code,列类型不应大写。一般来说,DSL 是关于定义 class 方法,而不是常量。
Sequel.migration do
up do
alter_table :same_table do
# ⇓⇓ NOTE SYMBOL
add_column :not_working, :jsonb
end
end
end
Sequel.migration do
up do
create_table :same_table do
# ⇓ NOTE DOWNCASE
jsonb :worked
end
end
end