Commit Graph

38 Commits

Author SHA1 Message Date
Cristi Balan
7f84f14efa Add rake db:forward - opposite of db:rollback [#768 state:resolved]
Example:
  rake db:forward # performs the next migration
  rake db:forward STEP=4 # performs the next 4 migrations

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-08 17:41:43 +01:00
Jeremy Kemper
019ed5a7c0 Don't rely on T::U::TestCase#name 2009-08-07 17:04:19 -07:00
Raimonds Simanovskis
5d0dece6a6 Oracle adapter gets Time or DateTime value already with timezone 2009-08-06 23:40:59 +03:00
Joseph Wilk
eb30e4ca40 Fixed a bug where create_table could not be called without a block [#2221 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-06-21 19:51:32 +01:00
Brian Hogan
b26c2c11ab Ensure table names are quoted while renaming for sqlite3 adapter [#2272 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-06-21 18:24:19 +01:00
Jason King
ac3848201d SQLite adapters now support DDL transactions [#2080 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-14 12:58:42 +00:00
Jeremy Kemper
1c36172c13 Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Marcello Nuccio
dfcf1e4cf6 Fixed broken migrations tests: added assert_equal. [#1704 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-07 11:00:24 +00:00
Jeremy Kemper
278186534c Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. 2009-02-03 18:40:22 -08:00
Ken Collins
8e4624be9e Remove SQL Server cases from tests for latest adapter work to pass rails expected behavior.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-19 18:00:56 +01:00
Frederick Cheung
d51a39ff50 Deal with MySQL's quirky handling of defaults and blob/text columns
[#1043 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-14 17:11:22 -07:00
Tarmo Tänav
ce3c76de7c Just look at sql_type when testing that the correct database-specific type was used
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-08-26 12:11:01 +02:00
Tarmo Tänav
707ee0e269 Made migrations transactional for PostgreSQL [#834 state:resolved]
Patch originally from http://dev.rubyonrails.org/ticket/5470
2008-08-22 14:46:25 -07:00
Patrick Reagan
683ff235e6 Ensure t.timestamps respects options. [#828 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-22 12:48:00 +01:00
Nik Wakelin
0809747845 Added MigrationProxy to defer loading of Migration classes until they are actually required by the migrator
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#747 state:resolved]
2008-08-06 12:46:52 +02:00
Tarmo Tänav
07578ac855 Fixed mysql change_column_default to not make the column always nullable.
Also added change_column_null to both mysql and sqlite to keep the api features closer to postgresql.

[#617 state:resolved]
2008-07-14 12:42:01 -07:00
Tarmo Tänav
8f72bc92e2 Fixed test_rename_nonexistent_column for PostgreSQL
Also fixed ability to run migration_test.rb alone

[#616 state:resolved]
2008-07-14 12:22:27 -07:00
Jeremy Kemper
4498aad4ac MySQL: treat integer with :limit => 11 as a display width, not byte size, for backward-compatibility. 2008-06-27 01:07:22 -07:00
Jeremy Kemper
f6520b7dc7 Test for tinyint 2008-06-23 23:42:06 -07:00
Tarmo Tänav
baddea95e1 Always treat integer :limit as byte length. [#420 state:resolved] 2008-06-22 20:42:31 -07:00
Michael Raidel
f94600bdaf ActiveRecord::Migrator#run records version-state after migrating. [#369 state:resolved] 2008-06-22 18:16:17 -07:00
Diego Algorta
2e1b56c937 MySQL: rename_column preserves default values. [#466 state:resolved] 2008-06-22 15:21:11 -07:00
Frederick Cheung
cff2291df5 Fix failing tests on mysql 4.1 & ruby 1.8.4. [#237 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-22 12:13:11 +01:00
Aslak Hellesøy
10fdf44236 Added protection against duplicate migration names (Aslak Hellesøy) [#112 state:resolved] 2008-05-11 13:37:29 -05:00
Tarmo Tänav
0a21193dc6 create_table :force => true no longer tries to drop a non-existing table
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-05-07 13:01:46 +12:00
David Heinemeier Hansson
96980bd561 Added change_table for migrations (Jeff Dean) [#71 state:resolved] 2008-05-03 11:29:47 -05:00
Frederick Cheung
ae51013c3f Provide data for the key column otherwise adding a unique index will fail. [#30 state:closed] 2008-04-23 14:24:20 +12:00
Ian White
82b4faf812 Fix migrations when migrating to a specified version number with a fresh database [#1 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-04-17 13:43:47 -05:00
Rick Olson
8a5a9dcbf6 Add support for interleaving migrations by storing which migrations have run in the new schema_migrations table. Closes #11493 [jordi]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9244 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-09 16:20:15 +00:00
Jeremy Kemper
0a2e980ddd Fix migration test when run in GMT zone. Closes #11477 [thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9175 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 00:28:40 +00:00
David Heinemeier Hansson
c00de99f69 Switched to UTC-timebased version numbers for migrations and the schema. This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches (closes #11458) [jbarnette]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9122 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 21:21:01 +00:00
Jeremy Kemper
dfa6888311 Migrations: create_table supports primary_key_prefix_type. Closes #10314.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 18:23:14 +00:00
Geoff Buesing
8e21ec36cf test_native_types expects DateTime.local_offset instead of DateTime.now.offset; fixes test breakage due to dst transition
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-10 06:48:15 +00:00
Jeremy Kemper
6f0b0125d0 Fix typo in migration test. Closes #11105 [h-lame]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8873 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-15 20:12:45 +00:00
Jeremy Kemper
e59978aa86 MySQL: omit text/blob defaults from the schema instead of using an empty string. Closes #10963.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-30 23:22:58 +00:00
Jeremy Kemper
39814fcce0 Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:20:51 +00:00
Jeremy Kemper
1e70928014 Fix paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:31:37 +00:00
Jeremy Kemper
42b39ae3f2 Move tests to cases
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:30:42 +00:00