跳至内容 跳至搜索

Active Record SQLite3 适配器表定义

方法
B
C
R

实例公共方法

belongs_to(*args, **options)

别名: references

change_column(column_name, type, **options)

# File activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb, line 8
def change_column(column_name, type, **options)
  name = column_name.to_s
  @columns_hash[name] = nil
  column(name, type, **options)
end

references(*args, **options)

也称为别名: belongs_to
# File activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb, line 14
def references(*args, **options)
  super(*args, type: :integer, **options)
end