Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 15
- Log:
Attempt to update Typo to a Typo SVN HEAD release from around the
time the prototype installation was set up on the RISC OS Open Limited
web site. Timestamps place this at 04-Jul so a revision from 05-Jul or
earlier was pulled and copied over the 2.6.0 tarball stable code.
- Author:
- adh
- Date:
- Sat Jul 22 23:27:35 +0100 2006
- Size:
- 738 Bytes
1 | class AttachContentToBlog < ActiveRecord::Migration |
2 | class BareContent < ActiveRecord::Base |
3 | include BareMigration |
4 | end |
5 | |
6 | class BareBlog < ActiveRecord::Base |
7 | include BareMigration |
8 | end |
9 | |
10 | def self.up |
11 | begin |
12 | add_column :contents, :blog_id, :integer |
13 | blog_id = BareBlog.find(:first).id |
14 | BareContent.find(:all).each {|c| c.blog_id = blog_id; c.save! } |
15 | change_column :contents, :blog_id, :integer, :null => false |
16 | add_index :contents, :blog_id |
17 | rescue Exception => e |
18 | remove_index :contents, :blog_id rescue nil |
19 | remove_column :contents, :blog_id rescue nil |
20 | raise e |
21 | end |
22 | end |
23 | |
24 | def self.down |
25 | remove_index :contents, :blog_id |
26 | remove_column :contents, :blog_id |
27 | end |
28 | end |