Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | Change the default `null` value for timestamps | Sean Griffin | 2014-08-12 | 1 | -3/+3 | |
| | | | | | | | | | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5. | |||||
* | | `index_exists?` with `:name` checks specified columns. | Yves Senn | 2014-08-13 | 1 | -7/+8 | |
|/ | | | | | | | | | | | | | | | [Yves Senn & Matthew Draper] The column check was embodied in the defaul index name. If the :name option was used, the specified columns were not verified at all. Given: ``` assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma) ``` That index could have been defined on any field, not necessarily on `:foo_id`. | |||||
* | Merge pull request #16231 from Envek/type_in_references | Yves Senn | 2014-07-22 | 1 | -2/+9 | |
|\ | | | | | | | | | | | * Allow to specify a type for foreign key column in migrations * unified the docs * some cleanup in CHANGELOG | |||||
| * | Allow to specify a type for foreign key column in migrations | Andrey Novikov | 2014-07-22 | 1 | -1/+2 | |
|/ | | | | [Andrey Novikov & Łukasz Sarnacki] | |||||
* | fk: add docs | Yves Senn | 2014-06-26 | 1 | -0/+58 | |
| | ||||||
* | fk: review corrections: indent, visibility, syntax, wording. | Yves Senn | 2014-06-26 | 1 | -8/+9 | |
| | ||||||
* | fk: use random digest names | Yves Senn | 2014-06-26 | 1 | -8/+12 | |
| | | | | | | The name of the foreign key is not relevant from a users perspective. Using random names resolves the urge to rename the foreign key when the respective table or column is renamed. | |||||
* | fk: `add/remove_foreign_key` are noop for adapters that don't support fk | Yves Senn | 2014-06-26 | 1 | -0/+4 | |
| | ||||||
* | fk: raise when identifiers are longer than `allowed_index_name_length`. | Yves Senn | 2014-06-26 | 1 | -1/+5 | |
| | ||||||
* | fk: support for on_update | Yves Senn | 2014-06-26 | 1 | -1/+2 | |
| | ||||||
* | fk: rename `dependent` to `on_delete` | Yves Senn | 2014-06-26 | 1 | -1/+1 | |
| | ||||||
* | fk: infere column name from table names. | Yves Senn | 2014-06-26 | 1 | -4/+14 | |
| | | | | This allows to create and remove foreign keys without specifying a column. | |||||
* | fk: support dependent option (:delete, :nullify and :restrict). | Yves Senn | 2014-06-26 | 1 | -1/+2 | |
| | ||||||
* | fk: `:primary_key` option for non-standard pk's. | Yves Senn | 2014-06-26 | 1 | -1/+3 | |
| | ||||||
* | fk: generalize using `AlterTable` and `SchemaCreation`. | Yves Senn | 2014-06-26 | 1 | -7/+30 | |
| | ||||||
* | fk: `foreign_keys`, `add_foreign_key` and `remove_foreign_key` for MySQL | Yves Senn | 2014-06-26 | 1 | -0/+7 | |
| | ||||||
* | /mysql/i -> MySQL, Spell correct in continuation to #15555 | Akshay Vishnoi | 2014-06-14 | 1 | -1/+1 | |
| | ||||||
* | Convert column name to string only once | Kuldeep Aggarwal | 2014-05-04 | 1 | -1/+2 | |
| | ||||||
* | Don't use send when we own the method | Rafael Mendonça França | 2014-03-26 | 1 | -34/+34 | |
| | ||||||
* | Invert the conditionals to make easier to read | Rafael Mendonça França | 2014-03-26 | 1 | -4/+4 | |
| | | | | Also improve some of the code conventions | |||||
* | Fixes bugs for using indexes in CREATE TABLE by adding checks for table ↵ | Steve Rice | 2014-03-25 | 1 | -1/+1 | |
| | | | | | | | | existence Also: - updates tests by stubbing table_exists? method - adds entry for creating indexes in CREATE TABLE to changelog | |||||
* | create indexes inline in CREATE TABLE for MySQL | Cody Cutrer | 2014-03-25 | 1 | -11/+10 | |
| | | | | | | | | This is important, because adding an index on a temporary table after it has been created would commit the transaction Conflicts: activerecord/CHANGELOG.md | |||||
* | Add missing parantheses in index_exists? | Yannick Schutz | 2014-02-25 | 1 | -1/+1 | |
| | ||||||
* | docs, AR already auto-detects primary keys. Closes #13946. [ci skip] | Yves Senn | 2014-02-05 | 1 | -3/+3 | |
| | | | | | This behavior was introduced since Rails 3.1 (207f266ccaaa9cd04cd2a7513ae5598c4358b510) but the docs were still out of date. | |||||
* | Make change_table use object of current database adapter | Nishant Modak | 2014-01-07 | 1 | -5/+5 | |
| | | | | | | | | | - Earlier, change_table was creating database-agnostic object. - After this change, it will create correct object based on current database adapter. - This will ensure that create_table and change_table will get same objects. - This makes update_table_definition method public and nodoc. - Fixes #13577 and #13503 | |||||
* | Fix missing closing rdoc tag [ci skip] | Carlos Antonio da Silva | 2013-12-16 | 1 | -1/+1 | |
| | ||||||
* | support creating temporary tables from queries | Cody Cutrer | 2013-12-14 | 1 | -10/+25 | |
| | | | | | also override drop_table in AbstractMySQLAdapter to properly drop temporary tables without committing the transaction | |||||
* | `connection.type_to_sql` returns a `String` for unmapped types. | Yves Senn | 2013-12-03 | 1 | -1/+1 | |
| | | | | | | | | | | Closes #13146. This fixes an error when using: ``` change_colum :table, :column, :bigint, array: true ``` | |||||
* | `rename_index`: add the new index before removing the old one. | Yves Senn | 2013-11-26 | 1 | -2/+2 | |
| | | | | | | | | | | | This prevents the following error when a MySQL index on a foreign key column is renamed: ``` ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_engines_on_car_id': needed in a foreign key constraint: DROP INDEX `index_engines_on_car_id` ON `engines` ``` refs: #13038. | |||||
* | Removed deprecated method `columns_for_remove` | Neeraj Singh | 2013-07-03 | 1 | -6/+0 | |
| | ||||||
* | Remove deprecated SchemaStatements#distinct | Francesco Rodriguez | 2013-07-02 | 1 | -9/+0 | |
| | ||||||
* | Fix documents for create_join_table | Satoshi Ebisawa | 2013-06-21 | 1 | -2/+2 | |
| | ||||||
* | Merge pull request #10425 from ↵ | Rafael Mendonça França | 2013-06-13 | 1 | -11/+0 | |
|\ | | | | | | | | | ranjaykrishna/push_add_column_options_to_schema_creation Push add column options to schema creation | |||||
| * | Moving add_column_options! up to SchemaCreation | jeran | 2013-06-12 | 1 | -11/+0 | |
| | | | | | | | | | | | | | | | | removed two instances of add_column_options! from abstract_mysql_adapter reworked rename_column_sql to remove add_column_options from schema_statements changed to use new hash syntax. | |||||
* | | Remove behavior that deals with a string as third argument of `add_index`, ↵ | kennyj | 2013-06-02 | 1 | -28/+14 | |
| | | | | | | | | | | | | because this was deprecated. Some testcases is failed, so I replaced nil to empty hash in add_reference. | |||||
* | | Merge pull request #10556 from Empact/deprecate-schema-statements-distinct | Rafael Mendonça França | 2013-05-12 | 1 | -1/+2 | |
| | | | | | | | | | | | | Deprecate SchemaStatements#distinct, and make SchemaStatements#columns_for_distinct nodoc. Conflicts: activerecord/CHANGELOG.md | |||||
* | | Fix that #exists? can produce invalid SQL: "SELECT DISTINCT DISTINCT" | Ben Woosley | 2013-05-10 | 1 | -3/+11 | |
| | | | | | | | | | | | | | | | | | | | | | | | | The combination of a :uniq => true association and the #distinct call in #construct_limited_ids_condition combine to create invalid SQL, because we're explicitly selecting DISTINCT, and also sending #distinct on to AREL, via the relation#distinct_value. Rather than build a select distinct clause in #construct_limited_ids_condition, I set #distinct! and pass just the columns into the select statement. This requires introducing a #columns_for_distinct method to return the select columns but not the statement itself. | |||||
* | | Refactor index algorithm lookup so that it only builds the available options ↵ | Carlos Antonio da Silva | 2013-03-30 | 1 | -4/+4 | |
| | | | | | | | | | | | | | | | | | | | | | | once This way the available options are only built for actually fetching the algorithm in case the option is given. The options are going to be necessary a second time only in case the option is given but does not exist, which is supposed to be due to a typo or something like that, so no problem. | |||||
* | | Make docs a little bit more consistent with colons [ci skip] | Carlos Antonio da Silva | 2013-03-30 | 1 | -9/+9 | |
| | | ||||||
* | | Fix code examples indent in new index options docs [ci skip] | Carlos Antonio da Silva | 2013-03-30 | 1 | -3/+3 | |
| | | ||||||
* | | Use new hash style in doc examples [ci skip] | Carlos Antonio da Silva | 2013-03-30 | 1 | -2/+2 | |
|/ | ||||||
* | Add support for FULLTEXT and SPATIAL indexes using the :type flag for MySQL. | Ken Mazaika | 2013-03-27 | 1 | -1/+14 | |
| | ||||||
* | Merge pull request #9928 from vipulnsward/fix_rename_auto_increment_mysql | Rafael Mendonça França | 2013-03-26 | 1 | -0/+3 | |
|\ | | | | | respect auto_increment in rename_column for mysql | |||||
| * | respect auto_increment in rename_column for mysql | Vipul A M | 2013-03-27 | 1 | -0/+3 | |
| | | ||||||
* | | Checks :algorithm argument for valid values | Dan McClain | 2013-03-26 | 1 | -1/+7 | |
| | | ||||||
* | | Adds support for concurrent indexing in PostgreSQL adapter | Dan McClain | 2013-03-25 | 1 | -2/+5 | |
|/ | | | | | | | | Adds support for algorithm option in MySQL indexes Moves USING and algorithm options upstream The syntax is still specific to the Adapter, so the actual executed string happens in the corresponding adapter | |||||
* | Custom index type support with :using. | doabit | 2013-03-24 | 1 | -2/+9 | |
| | ||||||
* | add uuid primary key support | Aaron Patterson | 2013-03-22 | 1 | -1/+1 | |
| | ||||||
* | push alter table add column sql in to the schema modification visitor | Aaron Patterson | 2013-03-22 | 1 | -3/+7 | |
| | ||||||
* | push SQL generation inside the schema creation object | Aaron Patterson | 2013-03-22 | 1 | -8/+4 | |
| |