timestamps

timestamps(options = {}) Instance Public methods Adds timestamps (created_at and updated_at) columns to the table. See ActiveRecord::ConnectionAdapters::SchemaStatements#add_timestamps t.timestamps

rename_index

rename_index(index_name, new_index_name) Instance Public methods Renames the given index on the table. t.rename_index(:user_id, :account_id)

rename

rename(column_name, new_column_name) Instance Public methods Renames a column. t.rename(:description, :name)

remove_timestamps

remove_timestamps() Instance Public methods Removes the timestamp columns (created_at and updated_at) from the table. t.remove_timestamps

remove_references

remove_references(*args) Instance Public methods Removes a reference. Optionally removes a type column. remove_references and remove_belongs_to are acceptable. t.remove_references(:user) t.remove_belongs_to(:supplier, polymorphic: true) remove_belongs_to

remove_index

remove_index(options = {}) Instance Public methods Removes the given index from the table. Remove the index_table_name_on_column in the table_name table t.remove_index :column Remove the index named index_table_name_on_branch_id in the table_name table t.remove_index column: :branch_id Remove the index named index_table_name_on_branch_id_and_party_id in the table_name table t.remove_index column: [:branch_id, :party_id] Remove the index named by_branch_party in the table_name ta

remove_belongs_to

remove_belongs_to(*args) Instance Public methods Alias for: remove_references

remove

remove(*column_names) Instance Public methods Removes the column(s) from the table definition. t.remove(:qualification) t.remove(:qualification, :experience)

references

references(*args) Instance Public methods Adds a reference. Optionally adds a type column, if :polymorphic option is provided. references and belongs_to are acceptable. t.references(:user) t.belongs_to(:supplier, polymorphic: true) belongs_to

index_exists?

index_exists?(column_name, options = {}) Instance Public methods Checks to see if an index exists. See ActiveRecord::ConnectionAdapters::SchemaStatements#index_exists?