Type:
Class

Represents an SQL table in an abstract way for updating a table. Also see TableDefinition and ActiveRecord::ConnectionAdapters::SchemaStatements#create_table

Available transformations are:

change_table :table do |t|
  t.column
  t.index
  t.rename_index
  t.timestamps
  t.change
  t.change_default
  t.rename
  t.references
  t.belongs_to
  t.string
  t.text
  t.integer
  t.float
  t.decimal
  t.datetime
  t.timestamp
  t.time
  t.date
  t.binary
  t.boolean
  t.remove
  t.remove_references
  t.remove_belongs_to
  t.remove_index
  t.remove_timestamps
end
change

change(column_name, type, options = {}) Instance Public methods Changes the

2015-06-20 00:00:00
remove

remove(*column_names) Instance Public methods Removes the column(s) from the

2015-06-20 00:00:00
remove_belongs_to

remove_belongs_to(*args) Instance Public methods Alias for:

2015-06-20 00:00:00
change_default

change_default(column_name, default) Instance Public methods Sets a new default

2015-06-20 00:00:00
index_exists?

index_exists?(column_name, options = {}) Instance Public methods Checks to see

2015-06-20 00:00:00
index

index(column_name, options = {}) Instance Public methods Adds a new index to

2015-06-20 00:00:00
remove_references

remove_references(*args) Instance Public methods Removes a reference. Optionally

2015-06-20 00:00:00
new

new(table_name, base) Class Public methods

2015-06-20 00:00:00
references

references(*args) Instance Public methods Adds a reference. Optionally adds

2015-06-20 00:00:00
column

column(column_name, type, options = {}) Instance Public methods Adds a new column

2015-06-20 00:00:00