Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Differentiate between remove_column and remove_columns. Make remove_column ↵ | Marc-Andre Lafortune | 2012-12-21 | 2 | -3/+14 |
| | | | | | | reversible. [#8267] | ||||
* | Make drop_table reversible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -11/+24 |
| | |||||
* | Add drop_join_table [#8267] | Marc-Andre Lafortune | 2012-12-21 | 2 | -4/+52 |
| | |||||
* | Allow reverting of migration commands with Migration#revert [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -48/+51 |
| | |||||
* | Simplify change_table and avoid duplicated logic | Marc-Andre Lafortune | 2012-12-21 | 1 | -26/+5 |
| | |||||
* | Keep index names when using with sqlite3 | Yves Senn | 2012-12-19 | 1 | -0/+10 |
| | |||||
* | Move to the schema-migrations-metadata branch. | Jeremy Kemper | 2012-12-09 | 2 | -2/+24 |
| | | | | | | | | | | | | | | | | | | | | | | | | Pending work on graceful app upgrades. Revert "Merge pull request #8439 from joshsusser/fixes" This reverts commit ce8ac39338f86388e70356b3a470b3ea443802ae, reversing changes made to b0e7b6f67c984d4b1502e801781ed75fad681633. Revert "Merge pull request #8431 from joshsusser/schemadump" This reverts commit 036d3e1c2b65c4b8cbd23de2e20ad67b9b756182, reversing changes made to 0c692f4d121792117b6a71e5ed590a31c3b9d12e. Revert "Merge branch 'joshsusser-master' into merge" This reverts commit 0c692f4d121792117b6a71e5ed590a31c3b9d12e, reversing changes made to 2e299fca715b083a60222a85e48f9d3b8dd8ce93. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb activerecord/test/cases/schema_dumper_test.rb | ||||
* | Remove method redefined warnings | Carlos Antonio da Silva | 2012-12-06 | 1 | -1/+1 |
| | |||||
* | Add metadata to schema_migrations | Josh Susser | 2012-12-01 | 2 | -25/+3 |
| | | | | | migrated_at: timestamp when migration run fingerprint: md5 hash of migration source name: filename without version or extension | ||||
* | Move migration test together with other join table tests | Carlos Antonio da Silva | 2012-11-21 | 1 | -0/+6 |
| | |||||
* | Initialize accessors to remove some warnings in Ruby 2.0 | Carlos Antonio da Silva | 2012-11-19 | 1 | -4/+2 |
| | |||||
* | Add rename_index to change_table. | Jarek Radosz | 2012-11-19 | 1 | -0/+7 |
| | |||||
* | Check if the options value is present before to send the deprecation | Rafael Mendonça França | 2012-11-03 | 1 | -2/+2 |
| | | | | message | ||||
* | Deprecate passing a string as third argument of `add_index` | Rafael Mendonça França | 2012-11-02 | 1 | -0/+10 |
| | | | | | | | 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 | -0/+6 |
| | | | | Closes #8104 | ||||
* | raise `ArgumentError` when redefining the primary key column. Closes #6378 | Yves Senn | 2012-10-28 | 1 | -0/+20 |
| | |||||
* | Cleanup trailing whitespaces | dfens | 2012-10-12 | 1 | -1/+1 |
| | |||||
* | column default extraction should handle newlines. | Aaron Patterson | 2012-08-17 | 1 | -0/+8 |
| | | | | Fixes #7374 | ||||
* | Remove ActiveRecord::Base.to_a | Jon Leighton | 2012-08-03 | 1 | -2/+2 |
| | | | | | On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway. | ||||
* | ActiveRecord::Base.all returns a Relation. | Jon Leighton | 2012-07-27 | 1 | -2/+2 |
| | | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway. | ||||
* | revert Default timestamps to non-null | Dave Kroondyk | 2012-07-18 | 2 | -6/+6 |
| | | | | | | | Commit 3dbedd2 added NOT NULL constraints to timestamps. Commit fcef728 started to revert this, but was incomplete. With this commit, 3dbedd2 should be fully reverted and timestamps will no longer default to NOT NULL. | ||||
* | Merge pull request #7028 from lexmag/join_table_indexes | José Valim | 2012-07-18 | 1 | -3/+17 |
|\ | | | | | Add indexes to create_join_table method | ||||
| * | Add join table migration generator | Aleksey Magusev | 2012-07-18 | 1 | -3/+17 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | ||||
* | | Add teardown method to AR::Mig::RenameTableTest | Robb Kidd | 2012-07-10 | 1 | -18/+13 |
| | | | | | | | | | | | | | | Dry up reseting the renamed table after each test. Also made use of the AR::Base.connection object already available from AR::MigrationTest#connection. | ||||
* | | Merge pull request #6874 from robbkidd/rename_sequences_too | Aaron Patterson | 2012-07-10 | 1 | -0/+13 |
|\ \ | |/ |/| | Rename default sequence when table is renamed? [AR:postgres] | ||||
| * | Update psql adapter to rename a default pkey sequence when renaming a table. | Robb Kidd | 2012-06-27 | 1 | -0/+13 |
| | | |||||
* | | Refactor references schema definitions | Aleksey Magusev | 2012-07-03 | 1 | -16/+12 |
| | | |||||
* | | Make references statements reversible | Aleksey Magusev | 2012-07-03 | 1 | -3/+27 |
| | | |||||
* | | Add references schema statements | Aleksey Magusev | 2012-07-03 | 2 | -1/+112 |
| | | | | | | | | | | | | | | | | | | | | Examples: add_reference :products, :supplier, polymorphic: true, index: true remove_reference :products, :user `add_belongs_to` and `remove_belongs_to` are acceptable. | ||||
* | | Use strings for the table names | Rafael Mendonça França | 2012-07-01 | 1 | -1/+1 |
| | | | | | | | | connection.tables returns an array of strings | ||||
* | | Merge pull request #6914 from lexmag/migration_tests | Rafael Mendonça França | 2012-07-01 | 2 | -37/+11 |
|\ \ | | | | | | | Refactor migration test_helper | ||||
| * | | Refactor migration test_helper | Aleksey Magusev | 2012-07-01 | 2 | -37/+11 |
| |/ | | | | | | | and create_join_table_test | ||||
* / | Add more options to column_exists? method | Aleksey Magusev | 2012-06-30 | 1 | -6/+12 |
|/ | | | | Also fix failures in check options for nil | ||||
* | TimeZone format is always /[+-]\d{2}:\d{2}/ in Ruby 1.9 | Akira Matsuda | 2012-06-12 | 1 | -1/+1 |
| | |||||
* | Skip two tests with polymorphic if current adapter is Oracle Adapter. | Yasuo Honda | 2012-06-08 | 1 | -0/+3 |
| | | | | because Oracle Adapter does not support foreign keys if :polymorphic => true is used. | ||||
* | port some mocha to minitest/mock | Aaron Patterson | 2012-05-18 | 1 | -0/+221 |
| | |||||
* | Integer limit out of range should be allowed to raise. Closes #6272 | Erich Menge | 2012-05-16 | 2 | -4/+10 |
| | |||||
* | remove calls to find(:first), find(:last) and find(:all) | Jon Leighton | 2012-04-26 | 2 | -6/+6 |
| | |||||
* | Automatically create indexes for references/belongs_to statements in migrations. | Joshua Wood | 2012-04-14 | 1 | -0/+99 |
| | |||||
* | improved test case for partial indices | Marcelo Silveira | 2012-02-09 | 1 | -6/+9 |
| | |||||
* | Made schema dumper recognize partial indices' where statements | Marcelo Silveira | 2012-02-09 | 1 | -0/+6 |
| | |||||
* | columns method doesn't have name argument | Rafael Mendonça França | 2012-02-02 | 1 | -5/+4 |
| | |||||
* | Add `create_join_table` migration helper to create HABTM join tables | Rafael Mendonça França | 2012-01-27 | 3 | -1/+82 |
| | |||||
* | Handle nil in add_index :length option in MySQL | Paul Sadauskas | 2012-01-24 | 1 | -1/+7 |
| | | | | | | | | | | | | | | | | | Our schema.rb is being generated with an `add_index` line similar to this: add_index "foo", ["foo", "bar"], :name => "xxx", :length => {"foo"=>8, "bar=>nil} This is the same as it was on Rails 3.1.3, however, now when that schema.rb is evaluated, its generating bad SQL in MySQL: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: CREATE UNIQUE INDEX `xxx` ON `foo` (`foo`(8), `bar`()) This commit adds a check for nil on the length attribute to prevent the empty parens from being output. | ||||
* | disable transactions for this test | Aaron Patterson | 2012-01-17 | 1 | -1/+4 |
| | |||||
* | silencing migrator tests, refactoring the migration test helper | Aaron Patterson | 2012-01-16 | 1 | -0/+9 |
| | |||||
* | Fix ActiveRecord mysql tests | Piotr Sarnacki | 2012-01-16 | 1 | -1/+2 |
| | | | | | | | | | TL;DR: MySQL sucks. Since it does not support transactions for schema changes, when you run `create_table` in setup block, it will commit current transaction. Now tests want to run `RELEASE SAVEPOINT` after finishing tests which fails since there is no transaction. | ||||
* | make sure the migration table is alive and empty | Aaron Patterson | 2012-01-13 | 1 | -0/+11 |
| | |||||
* | test code that finds migrations | Aaron Patterson | 2012-01-13 | 1 | -0/+4 |
| | |||||
* | removing migration files as they are no longer needed | Aaron Patterson | 2012-01-13 | 1 | -2/+2 |
| |