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:
- 861 Bytes
1 | class UpgradeSidebarObjects < ActiveRecord::Migration |
2 | class Sidebar < ActiveRecord::Base |
3 | include BareMigration |
4 | end |
5 | |
6 | def self.up |
7 | modify_tables_and_update(:add_column, Sidebar, :type, :string) do |sb| |
8 | next if $schema_generator |
9 | if sb.controller.nil? |
10 | raise "Found a sidebar, \"#{sb.id}\", which doesn't know its controller so can't convert it. Settings are:\n #{sb.settings}. Please either correct the controller or delete the sidebar." |
11 | end |
12 | sb.type = sb.controller.camelcase + 'Sidebar' |
13 | sb.save! |
14 | end |
15 | remove_column :sidebars, :controller |
16 | end |
17 | |
18 | def self.down |
19 | modify_tables_and_update(:add_column, Sidebar, :controller, :string) do |sb| |
20 | next if $schema_generator |
21 | sb.controller = sb[:type].underscore.sub(/_sidebar$/, '') |
22 | sb.save! |
23 | end |
24 | remove_column :sidebars, :type |
25 | end |
26 | end |