Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 2159 Bytes
1 | class SeparateEntriesAndFeedback < ActiveRecord::Migration |
2 | class Content < ActiveRecord::Base |
3 | end |
4 | |
5 | class Feedback < ActiveRecord::Base |
6 | end |
7 | |
8 | def self.up |
9 | # Comment this out once you've made a backup |
10 | |
11 | create_table :feedback, :force => true do |t| |
12 | t.column "type", :string |
13 | t.column "title", :string |
14 | t.column "author", :string |
15 | t.column "body", :text |
16 | t.column "extended", :text |
17 | t.column "excerpt", :text |
18 | t.column "keywords", :string |
19 | t.column "created_at", :datetime |
20 | t.column "updated_at", :datetime |
21 | t.column "user_id", :integer |
22 | t.column "permalink", :string |
23 | t.column "guid", :string |
24 | t.column "text_filter_id", :integer |
25 | t.column "whiteboard", :text |
26 | t.column "article_id", :integer |
27 | t.column "email", :string |
28 | t.column "url", :string |
29 | t.column "ip", :string, :limit => 40 |
30 | t.column "blog_name", :string |
31 | t.column "name", :string |
32 | t.column "published", :boolean, :default => false |
33 | t.column "allow_pings", :boolean |
34 | t.column "allow_comments", :boolean |
35 | t.column "blog_id", :integer, :null => false |
36 | t.column "published_at", :datetime |
37 | t.column "state", :text |
38 | t.column "status_confirmed", :boolean |
39 | end |
40 | |
41 | Content.transaction do |
42 | Feedback.transaction do |
43 | Content.find(:all, :conditions => {:type => %w{ Comment Trackback }}).each do |content| |
44 | Feedback.new(content.attributes) do |fb| |
45 | fb[:type] = content[:type] |
46 | fb.save! |
47 | end |
48 | end |
49 | Content.delete_all(:type => %w{ Comment Trackback }) |
50 | end |
51 | end |
52 | end |
53 | |
54 | def self.down |
55 | Content.transaction do |
56 | Feedback.transaction do |
57 | Feedback.find(:all).each do |fb| |
58 | Content.new(fb.attributes) do |cnt| |
59 | cnt[:type] = fb[:type] |
60 | cnt.save! |
61 | end |
62 | end |
63 | end |
64 | end |
65 | |
66 | drop_table :feedback |
67 | end |
68 | end |