public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Search Repo:
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
yaroslav (author)
Sun May 11 04:06:30 -0700 2008
commit  33a730791242bb12b2bcd8cfab0a59e2b750b725
tree    1d883f402575865a5d3bf8ea2cbf9a920812966a
parent  bc58c2c800ee1bb8e33b4054e8565ce7e19ee8fa
mephisto / db / migrate / 006_add_settings.rb
100644 29 lines (23 sloc) 0.705 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class OldSite < ActiveRecord::Base
  set_table_name 'sites'
end
 
class AddSettings < ActiveRecord::Migration
  def self.up
    create_table :sites do |t|
      t.column :title, :string, :limit => 255
      t.column :subtitle, :string, :limit => 255
      t.column :email, :string, :limit => 255
      t.column :ping_urls, :text
      t.column :filters, :text
      t.column :articles_per_page, :integer, :default => 15
    end
    
    add_column :articles, :filters, :text
    add_column :users, :filters, :text
    
    OldSite.create :title => 'Mephisto'
  end
 
  def self.down
    drop_table :sites
    
    remove_column :articles, :filters
    remove_column :users, :filters
  end
end