Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 13
- Log:
Initial import of Typo 2.6.0 sources from a downloaded Tarball.
Typo is a Ruby On Rails based blog engine.
- Author:
- adh
- Date:
- Sat Jul 22 22:25:02 +0100 2006
- Size:
- 638 Bytes
1 | module Migrator |
2 | mattr_accessor :offer_migration_when_available |
3 | @@offer_migration_when_available = true |
4 | |
5 | def self.migrations_path |
6 | "#{RAILS_ROOT}/db/migrate" |
7 | end |
8 | |
9 | def self.available_migrations |
10 | Dir["#{migrations_path}/[0-9]*_*.rb"].sort |
11 | end |
12 | |
13 | def self.current_schema_version |
14 | ActiveRecord::Migrator.current_version rescue 0 |
15 | end |
16 | |
17 | def self.max_schema_version |
18 | available_migrations.size |
19 | end |
20 | |
21 | def self.db_supports_migrations? |
22 | ActiveRecord::Base.connection.supports_migrations? |
23 | end |
24 | |
25 | def self.migrate(version = nil) |
26 | ActiveRecord::Migrator.migrate("#{migrations_path}/", version) |
27 | end |
28 | end |