我将Sequel与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
迁移使用了Jsonb而没有问题:
Sequel.migration do
up do
create_table :same_table do
Jsonb :worked
end
end
end
答案 0 :(得分:2)
如Sequel
source code所示,列类型不应大写。通常,DSL是关于定义类方法,而不是常量。
clear
set more off
*----- example data -----
sysuse auto
*----- two-variable example -----
eststo clear
// process price
estpost summarize price
matrix mymat = e(mean), e(count)
// process mpg
estpost summarize mpg if mpg > 15
matrix mymat = mymat \ e(mean), e(count)
// finish formatting matrix
matrix colnames mymat = mean count
matrix rownames mymat = price mpg
matrix list mymat
// tabulate
esttab matrix(mymat), nomtitles