Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Add metadata to schema_migrations | Josh Susser | 2012-12-01 | 1 | -3/+3 | |
| | | | | | migrated_at: timestamp when migration run fingerprint: md5 hash of migration source name: filename without version or extension | |||||
* | Typo | Chris Patuzzo | 2012-11-21 | 1 | -1/+1 | |
| | ||||||
* | Check if the options value is present before to send the deprecation | Rafael Mendonça França | 2012-11-03 | 1 | -4/+6 | |
| | | | | message | |||||
* | Remove old comment | Rafael Mendonça França | 2012-11-02 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | This comment is not valid since that `if` is there to make possible to do: remove_index :users, :name Instead of: remove_index :users, column: :name What is a valid use case. [ci skip] | |||||
* | Deprecate passing a string as third argument of `add_index` | Rafael Mendonça França | 2012-11-02 | 1 | -0/+6 | |
| | | | | | | | This was there due historical reasons since 7dc45818dc43c163700efc9896a0f3feafa31138 to give the user the possibility to create unique indexes passing "UNIQUE" as the third argument | |||||
* | Raise an ArgumentError when passing an invalid option to add_index | Rafael Mendonça França | 2012-11-02 | 1 | -1/+4 | |
| | | | | Closes #8104 | |||||
* | Migration of docs to 1.9 hash syntax | AvnerCohen | 2012-10-23 | 1 | -24/+24 | |
| | ||||||
* | load active_support/deprecation in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 | |
| | ||||||
* | Deprecate Relation#all. | Jon Leighton | 2012-07-27 | 1 | -1/+1 | |
| | | | | | | It has been moved to active_record_deprecated_finders. Use #to_a instead. | |||||
* | Add fkey attributes to `join_table` migration generator | Aleksey Magusev | 2012-07-19 | 1 | -3/+3 | |
| | ||||||
* | Add join table migration generator | Aleksey Magusev | 2012-07-18 | 1 | -2/+5 | |
| | | | | | | | | | | | | | For instance, running rails g migration CreateMediaJoinTable artists musics:uniq will create a migration with create_join_table :artists, :musics do |t| # t.index [:artist_id, :music_id] t.index [:music_id, :artist_id], unique: true end | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-07-07 | 1 | -2/+4 | |
|\ | ||||||
| * | fix AR::SchemaStatements#column_exists? example [ci skip] | Francesco Rodriguez | 2012-06-30 | 1 | -1/+1 | |
| | | ||||||
| * | update AR::SchemaStatements#column_exists? documentation [ci skip] | Francesco Rodriguez | 2012-06-30 | 1 | -2/+4 | |
| | | ||||||
* | | Don't need to use delete in the options hash | Rafael Mendonça França | 2012-07-03 | 1 | -2/+1 | |
| | | ||||||
* | | Add references schema statements | Aleksey Magusev | 2012-07-03 | 1 | -0/+37 | |
| | | | | | | | | | | | | | | | | | | | | Examples: add_reference :products, :supplier, polymorphic: true, index: true remove_reference :products, :user `add_belongs_to` and `remove_belongs_to` are acceptable. | |||||
* | | Add more options to column_exists? method | Aleksey Magusev | 2012-06-30 | 1 | -4/+6 | |
|/ | | | | Also fix failures in check options for nil | |||||
* | Symbol responds_to :upcase & :downcase in Ruby >= 1.9 | Akira Matsuda | 2012-06-06 | 1 | -1/+1 | |
| | ||||||
* | SchemaMigration should be loaded lazily. | kennyj | 2012-05-29 | 1 | -1/+0 | |
| | ||||||
* | remove unnecessary 'examples' noise [ci skip] | Vijay Dev | 2012-05-11 | 1 | -15/+7 | |
| | ||||||
* | Refactored remove_column | Edgars Beigarts | 2012-05-02 | 1 | -2/+0 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-04-18 | 1 | -1/+1 | |
|\ | ||||||
| * | Fix typo on the add_index. | kennyj | 2012-04-13 | 1 | -1/+1 | |
| | | ||||||
* | | Automatically create indexes for references/belongs_to statements in migrations. | Joshua Wood | 2012-04-14 | 1 | -0/+1 | |
|/ | ||||||
* | Updated/changed useless tr/gsubs | Jurriaan Pruis | 2012-04-03 | 1 | -1/+1 | |
| | ||||||
* | Use one 'be'. | Waseem Ahmad | 2012-03-24 | 1 | -1/+1 | |
| | ||||||
* | revert setting NOT NULL constraints in add_timestamps | Xavier Noria | 2012-03-01 | 1 | -2/+2 | |
| | | | | | | | | | | | Commit 3dbedd2 added NOT NULL constraints both to table creation and modification. For creation the new default makes sense, but the generic situation for changing a table is that there exist records. Those records have no creation or modification timestamps, and in the general case you don't even know them, so when updating a table these constraints are not going to work. See a bug report for this use case in #3334. | |||||
* | Revert "No need to pass options which is never used" | Rafael Mendonça França | 2012-02-15 | 1 | -2/+2 | |
| | | | | | | | | | Options is needed for some Rails extensions to determine when referential integrity should be disabled This reverts commit bcb466c543451dce69403aaae047295758589d8e. Fixes #5052 | |||||
* | Added where option to add_index to support postgresql partial indices | Marcelo Silveira | 2012-02-09 | 1 | -3/+13 | |
| | | | | | | | | | | | The `add_index` method now supports a `where` option that receives a string with the partial index criteria. add_index(:accounts, :code, :where => "active") Generates CREATE INDEX index_accounts_on_code ON accounts(code) WHERE active | |||||
* | Remove useless argument in #columns. | Sebastian Martinez | 2012-02-02 | 1 | -1/+1 | |
| | ||||||
* | Add `create_join_table` migration helper to create HABTM join tables | Rafael Mendonça França | 2012-01-27 | 1 | -0/+42 | |
| | ||||||
* | refactor schema migration table creation to the schema migration model | Aaron Patterson | 2012-01-13 | 1 | -9/+1 | |
| | ||||||
* | use the schema migration model to dump schema info | Aaron Patterson | 2012-01-13 | 1 | -2/+5 | |
| | ||||||
* | dropping support for `schema_info`. | Aaron Patterson | 2012-01-10 | 1 | -12/+0 | |
| | ||||||
* | Remove Array.wrap calls in ActiveRecord | Rafael Mendonça França | 2012-01-06 | 1 | -5/+4 | |
| | ||||||
* | Document that index names are made up of all columns, not just the first. | Jo Liss | 2011-12-27 | 1 | -9/+2 | |
| | | | | | | | | | | | index_name has been using the following expression "index_#{table_name}_on_#{Array.wrap(options[:column]) * '_and_'}" since at least 2006 (bc7f2315), and that's how they come out in my DB. Please check that this is correct before merging into master, perhaps I'm misunderstanding the section I changed. | |||||
* | Revert naive O(1) table_exists? implementation. | Jon Leighton | 2011-12-13 | 1 | -6/+1 | |
| | | | | | | | | | | It was a bad idea to rescue exceptions here. This can interfere with transaction rollbacks which seems to be the cause of current CI failure. Instead, each adapter should implement its own DB-specific O(1) implementation, and we fall back on the generic, slower, implementation otherwise. | |||||
* | don't need a begin / end. | Aaron Patterson | 2011-12-09 | 1 | -6/+4 | |
| | ||||||
* | squelch table exists? queries. | Aaron Patterson | 2011-12-09 | 1 | -1/+1 | |
| | ||||||
* | Quitoting the table name before querying. | Aaron Patterson | 2011-12-05 | 1 | -1/+1 | |
| | ||||||
* | Speed up table_exists? for databases with a large number of tables | Jade Rubick | 2011-12-05 | 1 | -1/+6 | |
| | | | | | | At New Relic, we have hundreds of thousands of tables, and our migrations took 30 minutes without this similar patch. This cuts it down to a more reasonable amount of time. The rescue false part is ugly, but necessary as far as I can tell. I don't know of a cross-database statement you can make that will work without trapping errors. | |||||
* | Deprecate set_primary_key in favour of self.primary_key= | Jon Leighton | 2011-11-29 | 1 | -1/+1 | |
| | ||||||
* | Revert "Merge pull request #1163 from amatsuda/sexier_migration_31" | Aaron Patterson | 2011-11-17 | 1 | -8/+2 | |
| | | | | | | | | | | This reverts commit 0e407a90413d8a19002b85508d811ccdf2190783, reversing changes made to 533a9f84b035756eedf9fdccf0c494dc9701ba72. Conflicts: activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb activerecord/test/cases/migration_test.rb | |||||
* | Revert "Merge pull request #3603 from vijaydev/change_table_without_block_arg" | Aaron Patterson | 2011-11-17 | 1 | -12/+7 | |
| | | | | | | | | | This reverts commit 81fad6a270ec3cbbb88553c9f2e8200c34fd4d13, reversing changes made to 23101de283de13517e30c4c3d1ecc65525264886. Conflicts: activerecord/test/cases/migration_test.rb | |||||
* | Adding a deprecation warning for use of the schema_info table. | Aaron Patterson | 2011-11-16 | 1 | -0/+2 | |
| | ||||||
* | Modify change_table to remove the need for the block argument. | Vijay Dev | 2011-11-11 | 1 | -7/+12 | |
| | ||||||
* | Checking the arity of the block passed to create_table | Vijay Dev | 2011-11-10 | 1 | -1/+7 | |
| | | | | | | A recent change made to create_table does away with the need for the block argument. Checking the arity will prevent the mixing up of the two syntaxes. | |||||
* | AR changes to support creating ordered (asc, desc) indexes | Vlad Jebelev | 2011-11-04 | 1 | -1/+29 | |
| | ||||||
* | Merge pull request #1163 from amatsuda/sexier_migration_31 | Aaron Patterson | 2011-11-04 | 1 | -2/+2 | |
|\ | | | | | Sexier migrations | |||||
| * | No "t." for the migration DSL! | Akira Matsuda | 2011-05-20 | 1 | -2/+2 | |
| | | | | | | | | | | Now you can omit |t| block parameter and all the t. from your migration code, that means, the syntax looks more Rails-3-ish, like the routes DSL and ActionMailer DSL. Also, this change won't break any of your existing migration files, since the traditional syntax is still available. |