| #add_belongs_to |
|
| #add_check_constraint |
Adds a new check constraint to the table. |
| #add_column |
Add a new type column named column_name to table_name. |
| #add_foreign_key |
|
| #add_index |
Adds a new index to the table. |
| #add_reference |
|
| #add_timestamps |
Adds timestamps (created_at and updated_at) columns to table_name. |
|
#assume_migrated_upto_version,
|
| #build_create_table_definition |
Returns a TableDefinition object containing information about the table that would be created if the same arguments were passed to #create_table. |
| #change_column |
Changes the column's definition according to the new options. |
| #change_column_comment |
Changes the comment for a column or removes it if nil. |
| #change_column_default |
Sets a new default value for a column: |
| #change_column_null |
Sets or removes a NOT NULL constraint on a column. |
| #change_foreign_key |
Changes an existing foreign key on a table. |
| #change_table |
A block for changing columns in table. |
| #change_table_comment |
Changes the comment for a table or removes it if nil. |
| #check_constraint_exists? |
Checks to see if a check constraint exists on a table for a given check constraint definition. |
| #check_constraints |
Returns an array of check constraints for the given table, or a ::Hash of them keyed by table name when given an ::Array of tables. |
| #column_exists? |
Checks to see if a column exists in a given table. |
| #columns |
Returns an array of Column objects for the given table, or a ::Hash of them keyed by table name when given an ::Array of tables. |
| #create_join_table |
Creates a new join table with the name created using the lexical order of the first two arguments. |
| #create_table |
Creates a new table with the name table_name. |
| #data_source_exists? |
Checks to see if the data source name exists on the database. |
| #data_sources |
Returns the relation names usable to back Active Record models. |
| #disable_index |
Prevents an index from being used by queries. |
| #drop_join_table |
Drops the join table specified by the given arguments. |
| #drop_table |
Drops a table or tables from the database. |
| #enable_index |
Enables an index to be used by queries. |
| #foreign_key_exists? |
Checks to see if a foreign key exists on a table for a given foreign key definition. |
| #foreign_keys |
Returns an array of foreign keys for the given table, or a ::Hash of them keyed by table name when given an ::Array of tables. |
| #index_exists? |
Checks to see if an index exists on a table for a given index definition. |
| #index_name_exists? |
Verifies the existence of an index with a given name. |
| #indexes |
Returns an array of indexes for the given table, or a ::Hash of them keyed by table name when given an ::Array of tables. |
| #max_index_name_size |
Returns the maximum length of an index name in bytes. |
| #native_database_types |
Returns a hash of mappings from the abstract data types to the native database types. |
|
#options_include_default?,
|
| #primary_key |
Returns just a table's primary key. |
| #remove_belongs_to |
|
| #remove_check_constraint |
Removes the given check constraint from the table. |
| #remove_column |
Removes the column from the table definition. |
| #remove_columns |
Removes the given columns from the table definition. |
| #remove_foreign_key |
Removes the given foreign key from the table. |
| #remove_index |
Removes the given index from the table. |
| #remove_reference |
Removes the reference(s). |
| #remove_timestamps |
Removes the timestamp columns (created_at and updated_at) from the table definition. |
| #rename_column |
|
| #rename_index |
|
| #rename_table |
|
| #table_alias_for |
Truncates a table alias according to the limits of the current adapter. |
| #table_comment |
Returns the table comment that's stored in database metadata. |
| #table_exists? |
Checks to see if the table table_name exists on the database. |
| #table_options |
Returns the options the given table was created with, or a ::Hash of them keyed by table name when given an ::Array of tables. |
| #tables |
Returns an array of table names defined in the database. |
| #view_exists? |
Checks to see if the view view_name exists on the database. |
| #views |
Returns an array of view names defined in the database. |
|
#add_index_sort_order,
|
| #add_options_for_index_columns |
Overridden by the MySQL adapter for supporting index lengths and by the PostgreSQL adapter for supporting operator classes. |
|
#can_remove_index_by_name?,
#change_column_comment_sql,
#change_index_comment_sql,
#change_table_comment_sql,
#check_constraint_for,
#check_constraint_for!,
#check_constraint_name,
#column_options_keys,
#create_alter_table,
#create_index_definition,
#create_table_definition,
#data_source_sql,
#drop_table_sql,
#execute_alter_table,
|
| #expression_column_name? |
Try to identify whether the given column name is an expression. |
|
#extract_foreign_key_action,
|
| #extract_new_comment_value |
|
|
#extract_new_default_value,
|
| #fetch_by_schema |
One read filters by one schema, so tables naming different schemas are read a schema at a time. |
|
#fetch_column_definitions,
#fetch_table_options,
#fetch_type_metadata,
#foreign_key_for,
#foreign_key_for!,
#foreign_key_name,
#generate_index_name,
#has_expression_column_name?,
#index_column_names,
#index_name_for_remove,
#index_name_options,
#insert_versions_sql,
#options_for_index_columns,
#quoted_scope,
#quoted_table_names,
#reference_name_for_table,
#rename_column_indexes,
#rename_table_indexes,
#rows_for,
#strip_table_name_prefix_and_suffix,
#valid_index_options,
#validate_change_column_null_argument!,
#validate_create_table_options!,
#validate_index_length!,
#validate_table_length!,
#add_columns,
#add_index_options,
|
| #build_alter_table_definition |
Returns an AlterTable object containing information about changes that would be made to table_name. |
| #build_create_index_definition |
|
| #build_create_join_table_definition |
|
|
#bulk_change_table,
#check_constraint_options,
|
| #columns_for_distinct |
Given a set of columns and an ORDER BY clause, returns the columns for a SELECT DISTINCT. |
|
#create_schema_dumper,
#distinct_relation_for_primary_key,
#dump_schema_versions,
#foreign_key_column_for,
#foreign_key_options,
#index_algorithm,
#index_name,
#internal_string_options_for_primary_key,
#quoted_columns_for_index,
#remove_constraint,
|
| #schema_creation |
Returns an instance of SchemaCreation, which can be used to visit a schema definition object and return DDL. |
|
#type_to_sql,
#update_table_definition,
#valid_column_definition_options,
#valid_primary_key_options,
#valid_table_definition_options
|