Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 341
- Log:
Lots of changes to Hub to make it Rails 2.3.11 compatible. This is being
checked in as one large changeset because it doesn't really split down into
smaller components without having something that doesn't function in the
intermediate steps.
- Author:
- rool
- Date:
- Sat Mar 19 19:11:39 +0000 2011
- Size:
- 1714 Bytes
1 | namespace :db do |
2 | desc "Dump schema and data to db/schema.rb and db/data.yml" |
3 | task(:dump => [ "db:schema:dump", "db:data:dump" ]) |
4 | |
5 | desc "Load schema and data from db/schema.rb and db/data.yml" |
6 | task(:load => [ "db:schema:load", "db:data:load" ]) |
7 | |
8 | namespace :data do |
9 | def db_dump_data_file (extension = "yml") |
10 | "#{dump_dir}/data.#{extension}" |
11 | end |
12 | |
13 | def dump_dir(dir = "") |
14 | "#{RAILS_ROOT}/db#{dir}" |
15 | end |
16 | |
17 | desc "Dump contents of database to db/data.extension (defaults to yaml)" |
18 | task :dump => :environment do |
19 | format_class = ENV['class'] || "YamlDb::Helper" |
20 | helper = format_class.constantize |
21 | SerializationHelper::Base.new(helper).dump db_dump_data_file helper.extension |
22 | end |
23 | |
24 | desc "Dump contents of database to curr_dir_name/tablename.extension (defaults to yaml)" |
25 | task :dump_dir => :environment do |
26 | format_class = ENV['class'] || "YamlDb::Helper" |
27 | dir = ENV['dir'] || "#{Time.now.to_s.gsub(/ /, '_')}" |
28 | SerializationHelper::Base.new(format_class.constantize).dump_to_dir dump_dir("/#{dir}") |
29 | end |
30 | |
31 | desc "Load contents of db/data.extension (defaults to yaml) into database" |
32 | task :load => :environment do |
33 | format_class = ENV['class'] || "YamlDb::Helper" |
34 | helper = format_class.constantize |
35 | SerializationHelper::Base.new(helper).load (db_dump_data_file helper.extension) |
36 | end |
37 | |
38 | desc "Load contents of db/data_dir into database" |
39 | task :load_dir => :environment do |
40 | dir = ENV['dir'] || "base" |
41 | format_class = ENV['class'] || "YamlDb::Helper" |
42 | SerializationHelper::Base.new(format_class.constantize).load_from_dir dump_dir("/#{dir}") |
43 | end |
44 | end |
45 | end |