index

index(column_name, options = {}) Instance Public methods Adds a new index to the table. column_name can be a single Symbol, or an Array of Symbols. See ActiveRecord::ConnectionAdapters::SchemaStatements#add_index Creating a simple index t.index(:name) Creating a unique index t.index([:branch_id, :party_id], unique: true) Creating a named index t.index([:branch_id, :party_id], unique: true, name: 'by_branch_party')

column_exists?

column_exists?(column_name, type = nil, options = {}) Instance Public methods Checks to see if a column exists. See ActiveRecord::ConnectionAdapters::SchemaStatements#column_exists?

column

column(column_name, type, options = {}) Instance Public methods Adds a new column to the named table. See ActiveRecord::ConnectionAdapters::TableDefinition#column for details of the options you can use. Creating a simple column t.column(:name, :string)

change_default

change_default(column_name, default) Instance Public methods Sets a new default value for a column. See ActiveRecord::ConnectionAdapters::SchemaStatements#change_column_default t.change_default(:qualification, 'new') t.change_default(:authorized, 1)

change

change(column_name, type, options = {}) Instance Public methods Changes the column's definition according to the new options. See ActiveRecord::ConnectionAdapters::TableDefinition#column for details of the options you can use. t.change(:name, :string, limit: 80) t.change(:description, :text)

belongs_to

belongs_to(*args) Instance Public methods Alias for: references

new

new(table_name, base) Class Public methods

length

length() Instance Public methods

key?

key?(key) Instance Public methods

each

each() Instance Public methods