aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Skip test_remove_column_with_array_as_an_argument_is_deprecated with ↵Yasuo Honda2013-02-281-3/+1
| | | | | | | | Oracle adapter." This reverts commit 7544c7a9f290a3ea25099ae38d52795458391785. Oracle enhanced adapter is supporting remove_column with Array.
* Fix ORA-00972 error at test_rename_table_with_prefix_and_suffixYasuo Honda2013-02-281-4/+4
| | | | backport pull request#5837 to 3-2-stable
* Sqlite preserves primary keys when copying/altering tables.Yves Senn2013-02-231-0/+14
| | | | | | | | Backport #2312. Fixes #9367. I also added a test-case to make sure that renaming or removing a column preserves the primary key.
* Backport #8522, Keep index names when using with sqlite3Yves Senn2012-12-191-0/+12
| | | | | | | | Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb activerecord/test/cases/migration/rename_column_test.rb
* recognize migrations, in folders containing numbers and 'rb'.Yves Senn2012-12-131-0/+6
| | | | | | | | | Backport of #8500 Closes #8492 Conflicts: activerecord/test/cases/migrator_test.rb
* Table#remove passed an array to remove_column, which is deprecated.Joe Rafaniello2012-08-181-2/+2
| | | | See 02ca9151a043a4fefbb3f22edd05f0cd392fffaa
* Update psql adapter to rename a default pkey sequence during rename_table.Robb Kidd2012-07-101-0/+20
|
* Remove warningRafael Mendonça França2012-06-101-1/+1
|
* Skip test_remove_column_with_array_as_an_argument_is_deprecated with Oracle ↵Yasuo Honda2012-06-021-1/+3
| | | | | | | adapter. Because Oracle adapter supports only remove_column :table_name, :column_name syntax and it has never supported remove_column :table_name, [:column_name].
* Fix buildFrancesco Rodriguez2012-05-091-1/+9
|
* Deprecate remove_column with array as an argumentPiotr Sarnacki2012-05-021-0/+6
|
* Use real table and columns for index testRafael Mendonça França2012-02-081-3/+3
|
* Push proper test changes for previous commit conflicts.José Valim2012-02-081-2/+4
|
* Handle nil in add_index :length option in MySQLPaul Sadauskas2012-02-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | 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. Conflicts: activerecord/test/cases/migration/index_test.rb Signed-off-by: José Valim <jose.valim@gmail.com>
* Allow to filter migrations by passing a blockPiotr Sarnacki2011-12-091-0/+18
| | | | | | | | | | Example: ActiveRecord::Migrator.migrate(path) do |migration| migration.name =~ /User/ end The above example will migrate only migrations with User in the name
* Compare migrations for copying only by name and scopePiotr Sarnacki2011-12-091-26/+1
|
* Add suffix for migrations copied from enginesPiotr Sarnacki2011-12-091-23/+23
|
* String#to_a is not available in 1.9Piotr Sarnacki2011-12-091-1/+1
|
* Run also migrations in subdirectories.Piotr Sarnacki2011-12-091-0/+9
| | | | | With this commit, ActiveRecord will also look for migrations in db/migrate subdirectories.
* Ignore origin comment when checking for duplicates on Migration.copyPiotr Sarnacki2011-12-091-3/+29
| | | | | | | 49ebe51 fixed copying migrations, but existing migrations would still trigger warnings. The proper way to compare migrations is to ignore origin lines - if migration is identical it means that we can silently skip it, regardless where it comes from.
* Fix copying migrations from enginesPiotr Sarnacki2011-12-091-0/+21
| | | | | | | | | | There was a bug in ActiveRecord::Migration.copy method, which prevented adding special comment about the origin of migration. Because of that, the check if migration is identical or if it's not and should be skipped was always saying that migration is skipped, which was causing additional useless warnings about skipped migrations.
* avoid deprecated methodsAaron Patterson2011-12-061-1/+1
|
* add prefix and suffix to renamed tables, closes #1510Vasiliy Ermolovich2011-12-061-0/+31
|
* Deprecate set_table_name in favour of self.table_name= or defining your own ↵Jon Leighton2011-11-291-1/+1
| | | | method.
* Revert "Merge pull request #1163 from amatsuda/sexier_migration_31"Aaron Patterson2011-11-171-120/+0
| | | | | | | | | | 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 Patterson2011-11-171-54/+0
| | | | | | | | | This reverts commit 81fad6a270ec3cbbb88553c9f2e8200c34fd4d13, reversing changes made to 23101de283de13517e30c4c3d1ecc65525264886. Conflicts: activerecord/test/cases/migration_test.rb
* Merge pull request #3371 from yahonda/fix_ora_00932_errorAaron Patterson2011-11-141-1/+1
|\ | | | | Fix ORA-00932 error when trying to insert 0 to DATE type columns.
| * Fix ORA-00932 error when trying to insert 0 to DATE type columns.Yasuo Honda2011-10-191-1/+1
| |
* | change_table bulk test case should check if the connection supports bulk alterVijay Dev2011-11-111-13/+15
| |
* | Modify change_table to remove the need for the block argument.Vijay Dev2011-11-111-0/+52
| |
* | Checking the arity of the block passed to create_tableVijay Dev2011-11-101-0/+15
| | | | | | | | | | | | 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) indexesVlad Jebelev2011-11-041-0/+12
| |
* | Merge pull request #1163 from amatsuda/sexier_migration_31Aaron Patterson2011-11-041-0/+20
|\ \ | | | | | | Sexier migrations
| * | Tests for new create_table DSLAkira Matsuda2011-05-201-0/+20
| | |
* | | assert_match takes a regexp and a string in that orderVijay Dev2011-10-311-1/+1
| | |
* | | dump_schema_information: explicitly order inserts into schema_migrations tableLaust Rud Jacobsen2011-10-311-0/+9
| | | | | | | | | | | | | | | | | | | | | This change reduces churn in the db/development_structure.sql file when using :sql as active_record.schema_format, and makes comparing diffs much easier. Test ensures the output SQL-statements are lexically ordered by version.
* | | preserve decimal column attributes after migrationGreg Reinacker2011-10-211-0/+36
| |/ |/|
* | only use now() on pg!Aaron Patterson2011-10-181-1/+3
| |
* | use now() for dates in pgAaron Patterson2011-10-181-1/+1
| |
* | Default timestamps to non-nullMike Perham2011-10-141-5/+5
| |
* | Changed the default value for the options argument on ↵Grant Neufeld2011-06-181-0/+12
| | | | | | | | | | | | | | ActiveRecord::ConnectionAdapters::Table#column_exists? from nil to an empty Hash {}. That method calls through to ActiveRecord::ConnectionAdapters::SchemaStatements##column_exists? expects options to be a Hash. When options was nil, an error would occur in cases where the column did exist because the called method attempted to perform a key lookup on options.
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
| |
* | Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
|/ | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Active Record typos.R.T. Lechow2011-03-051-2/+2
|
* adjust query counts to be consistent across databases, make sure database ↵Aaron Patterson2011-02-041-1/+4
| | | | log the same things
* Run BulkAlterTableMigrationsTest only when the adapter supports themPratik Naik2011-01-311-97/+99
|
* Add :bulk => true option to change_tablePratik Naik2011-01-311-0/+138
|
* In a number of places in the tests, we only need to turn off transactional ↵Jon Leighton2011-01-111-2/+1
| | | | fixtures when the DB does not support savepoints. This speeds the test run up by about 8-9% on my computer, when running rake test_sqlite3_mem :)
* Fix test on finding migrations from 2 pathsPiotr Sarnacki2010-12-091-5/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Allow to run migrations from more than one directoryPiotr Sarnacki2010-12-091-0/+12
|