Skip to Content Skip to Search

Active Record SQLite3 Adapter Table Definition

Methods
B
C
R

Instance Public methods

belongs_to(*args, **options)

Alias for: 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

  existing_column = @columns_hash[name]
  if existing_column
    existing_options = existing_column.options.except(:precision)
    options = existing_options.merge(options)
  end

  @columns_hash[name] = nil
  column(name, type, **options)
end

references(*args, **options)

Also aliased as: belongs_to
# File activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb, line 21
def references(*args, **options)
  super(*args, type: :integer, **options)
end