aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration
Commit message (Collapse)AuthorAgeFilesLines
* column default extraction should handle newlines.Aaron Patterson2012-08-171-0/+8
| | | | Fixes #7374
* Remove ActiveRecord::Base.to_aJon Leighton2012-08-031-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 Leighton2012-07-271-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-nullDave Kroondyk2012-07-182-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_indexesJosé Valim2012-07-181-3/+17
|\ | | | | Add indexes to create_join_table method
| * Add join table migration generatorAleksey Magusev2012-07-181-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::RenameTableTestRobb Kidd2012-07-101-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_tooAaron Patterson2012-07-101-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 Kidd2012-06-271-0/+13
| |
* | Refactor references schema definitionsAleksey Magusev2012-07-031-16/+12
| |
* | Make references statements reversibleAleksey Magusev2012-07-031-3/+27
| |
* | Add references schema statementsAleksey Magusev2012-07-032-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 namesRafael Mendonça França2012-07-011-1/+1
| | | | | | | | connection.tables returns an array of strings
* | Merge pull request #6914 from lexmag/migration_testsRafael Mendonça França2012-07-012-37/+11
|\ \ | | | | | | Refactor migration test_helper
| * | Refactor migration test_helperAleksey Magusev2012-07-012-37/+11
| |/ | | | | | | and create_join_table_test
* / Add more options to column_exists? methodAleksey Magusev2012-06-301-6/+12
|/ | | | Also fix failures in check options for nil
* TimeZone format is always /[+-]\d{2}:\d{2}/ in Ruby 1.9Akira Matsuda2012-06-121-1/+1
|
* Skip two tests with polymorphic if current adapter is Oracle Adapter.Yasuo Honda2012-06-081-0/+3
| | | | because Oracle Adapter does not support foreign keys if :polymorphic => true is used.
* port some mocha to minitest/mockAaron Patterson2012-05-181-0/+221
|
* Integer limit out of range should be allowed to raise. Closes #6272Erich Menge2012-05-162-4/+10
|
* remove calls to find(:first), find(:last) and find(:all)Jon Leighton2012-04-262-6/+6
|
* Automatically create indexes for references/belongs_to statements in migrations.Joshua Wood2012-04-141-0/+99
|
* improved test case for partial indicesMarcelo Silveira2012-02-091-6/+9
|
* Made schema dumper recognize partial indices' where statementsMarcelo Silveira2012-02-091-0/+6
|
* columns method doesn't have name argumentRafael Mendonça França2012-02-021-5/+4
|
* Add `create_join_table` migration helper to create HABTM join tablesRafael Mendonça França2012-01-273-1/+82
|
* Handle nil in add_index :length option in MySQLPaul Sadauskas2012-01-241-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 testAaron Patterson2012-01-171-1/+4
|
* silencing migrator tests, refactoring the migration test helperAaron Patterson2012-01-161-0/+9
|
* Fix ActiveRecord mysql testsPiotr Sarnacki2012-01-161-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 emptyAaron Patterson2012-01-131-0/+11
|
* test code that finds migrationsAaron Patterson2012-01-131-0/+4
|
* removing migration files as they are no longer neededAaron Patterson2012-01-131-2/+2
|
* fixing test class nameAaron Patterson2012-01-132-2/+2
|
* adding a test class for table renamingAaron Patterson2012-01-132-0/+78
|
* moving more column renaming testsAaron Patterson2012-01-131-0/+75
|
* moving more renaming tests to the proper test caseAaron Patterson2012-01-132-0/+71
|
* moving rename column tests to their own classAaron Patterson2012-01-133-17/+125
|
* moving column attributes tests to their own classAaron Patterson2012-01-131-0/+174
|
* move another index related test caseAaron Patterson2012-01-132-70/+68
|
* move tests regarding index modification to their own classAaron Patterson2012-01-132-84/+102
|
* decoupling more tests from AR::BaseAaron Patterson2012-01-131-0/+45
|
* move more schema modification testsAaron Patterson2012-01-131-0/+70
|
* remove dependency on the filesystemAaron Patterson2012-01-131-3/+8
|
* moving logger test to its own fileAaron Patterson2012-01-131-0/+17
|
* moving the table and index test to it's own fileAaron Patterson2012-01-121-0/+24
|
* adding missing requireAaron Patterson2012-01-101-0/+2
|
* move column ordering tests to it's own classAaron Patterson2012-01-102-46/+58
|
* refactoring migration testAaron Patterson2012-01-101-0/+414
|
* Fix GH #4285. Remove options when we record calling creat_tablekennyj2012-01-041-0/+6
|