Commit Graph

137 Commits

Author SHA1 Message Date
Piotr Sarnacki
3d01ef6dd1 require core_ext/array/wrap in active_record/migration
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-10 08:33:48 +01:00
Piotr Sarnacki
e12810178c Use Array.wrap instead of using ternary
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-09 18:50:49 +01:00
Piotr Sarnacki
d0467e08e5 Allow to run migrations from more than one directory 2010-12-09 00:04:36 +01:00
Aaron Patterson
47737681fd in the middle of refactoring 2010-12-03 12:00:09 -08:00
Aaron Patterson
9a3e29e126 remove calls to deprecated methods 2010-12-02 15:56:55 -08:00
Aaron Patterson
6673d88f6f avoiding deprecated methods in arel 2010-12-02 14:02:52 -08:00
Aaron Patterson
3ec212e3c9 rolling out migrated_at until I can fix the build 2010-12-01 17:08:01 -08:00
Josh Susser
7139aa878c name in schema_migrations, migrations in schema dump 2010-12-01 10:57:38 -08:00
Josh Susser
4e4e9ad48a record migration timestamp when migrations run 2010-12-01 10:46:29 -08:00
Aaron Patterson
a4d9b1d329 adding documentation for reversible migrations 2010-11-19 11:34:42 -08:00
Aaron Patterson
47017bd169 invertable migrations are working 2010-11-19 10:31:03 -08:00
Aaron Patterson
843e319f78 partial implementation of the command recorder 2010-11-19 10:24:15 -08:00
Aaron Patterson
24174d1b3a this return value is not used, so stop returning it 2010-11-19 10:23:13 -08:00
Aaron Patterson
9280fbf795 instantiate the delegate object after initialize is defined so that our initialize method actually gets called 2010-11-19 10:14:13 -08:00
Aaron Patterson
07a74f196d connection is set from the connection pool during migrations 2010-11-18 15:53:59 -08:00
Aaron Patterson
43e2e10f4f adding an initialize with name and version defaults 2010-11-17 15:30:09 -08:00
Aaron Patterson
c1a63c8dba fixing more documentation 2010-11-17 14:57:54 -08:00
Aaron Patterson
d1fcba8118 fixing documentation, removing unused AS files 2010-11-17 14:57:54 -08:00
Aaron Patterson
7906e08bba fixing indentation since these methods are not class methods 2010-11-17 14:57:54 -08:00
Aaron Patterson
606e41a4dd these methods are no longer needed 2010-11-17 14:57:54 -08:00
Aaron Patterson
b0a6f58068 do not need these accessors 2010-11-17 14:26:35 -08:00
Aaron Patterson
68b66ef308 testing instance based migrations 2010-11-17 14:26:35 -08:00
Aaron Patterson
974ff0dd43 singleton method added is no longer needed 2010-11-17 14:26:35 -08:00
Aaron Patterson
0bea9fd6be schema migrations work as instances 2010-11-17 14:26:34 -08:00
Aaron Patterson
8b2f801ed8 converted migrations to support instance methods 2010-11-17 14:26:34 -08:00
Piotr Sarnacki
437ceab139 Create directory before copying migrations if it does not exist 2010-11-16 17:00:01 +01:00
Piotr Sarnacki
022205be1d Add callback on skipped migration while copying migrations 2010-10-09 21:32:34 +02:00
Piotr Sarnacki
4377f8eba2 Change the method for copying migrations, do not add scope.
The purpose of this change is to allow copying fail on the same names.
Migrations change database and they should be treated with caution,
if 2 migrations are named the same it's much better to skip migration
and allow user decide if it should be copied or not.
2010-10-09 21:32:34 +02:00
Aaron Patterson
69a2c6b041 converting inject([]) to map 2010-10-03 16:42:08 -07:00
Aaron Patterson
365c93b7cd speed up duplicate migration detection 2010-10-03 16:39:48 -07:00
Aaron Patterson
40761c4bf3 reduce the number of calls to camelize 2010-10-03 16:36:43 -07:00
Aaron Patterson
e6583901e5 convertion MigrationProxy to a Struct, initialize instance variables 2010-10-03 16:32:27 -07:00
Aaron Patterson
341e71a1b9 dry up some migration logic 2010-10-03 16:23:07 -07:00
Aaron Patterson
8beda11fd3 no need to differentiate between nil and false in this case 2010-10-03 16:13:45 -07:00
Piotr Sarnacki
e063879daf Fix copying migrations to empty directory 2010-09-03 22:59:10 +02:00
Piotr Sarnacki
75f8ac6ea7 Implemented ActiveRecord::Migrations#copy based on James Adam's idea
ActiveRecord::Migration#copy allows to copy migrations from one place
to another, changing migrations versions and adding scope to filename.

For example:
ActiveRecord::Migration.copy("db/migrate",
        :blog_engine => "vendor/gems/blog/db/migrate")

will copy all migrations from vendor/gems/blog/db/migrate to db/migrate
with such format:

Versions of copied migrations will be reversioned to be appended after
migrations that already exists in db/migrate
2010-09-03 22:59:09 +02:00
Piotr Sarnacki
b52dfc6726 Added Rails.application.config.paths.db.migrate to remove hardcoded db/migrate paths 2010-09-03 22:59:08 +02:00
José Valim
599e46bf24 Revert "Setup explicit requires for files with exceptions. Removed them from autoloading."
Booting a new Rails application does not work after this commit [#5359 state:open]

This reverts commit 38a421b34d.
2010-09-02 21:11:03 +02:00
Łukasz Strzałkowski
38a421b34d Setup explicit requires for files with exceptions. Removed them from autoloading.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-02 11:54:04 +02:00
Santiago Pastorino
b451de0d6d Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
Prem Sichanugrist
a7eb8d97a4 Removing most of the symbol to proc usage in Active Record
This will hopefully make Active Record run a bit more faster.
2010-08-13 16:24:49 -07:00
Benjamin Quorning
7e075e6247 Fixed many references to the old config/environment.rb and Rails::Initializer 2010-07-13 13:00:21 +02:00
Tekin
d7c2e52c6c migrations.rb requires active_support/core_ext/module/aliasing [#5008 state:committed]
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-06-30 00:53:23 +02:00
rohit
0758d49300 Revert "Guides: Add :references to supported column types."
This reverts commit 41ed4db560.
2010-06-24 09:55:49 +05:30
rohit
41ed4db560 Guides: Add :references to supported column types. 2010-06-24 09:41:44 +05:30
Rizwan Reza
d8277804b2 Adds title and minor changes. 2010-06-16 22:08:14 +04:30
Rizwan Reza
c86915450a Adds title. 2010-06-15 23:11:30 +04:30
Neeraj Singh
f4d174b211 making rake:migrate VERSION=0 a noop called in succession. [#2137 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-29 13:41:35 +02:00
Xavier Noria
89978f10af moves Object#singleton_class to Kernel#singleton_class to match Ruby also there, same for #class_eval to simplify, and adds coverage for class_eval 2010-04-05 12:15:08 -07:00
Aaron Patterson
ed21f0c502 expand migration paths before requiring them. [#4240 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
2010-03-23 18:22:46 -07:00