File: migration.rb

package info (click to toggle)
ruby-feedtools 0.2.29%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,008 kB
  • sloc: ruby: 18,815; sql: 39; makefile: 13
file content (21 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class AddFeedToolsTables < ActiveRecord::Migration
  def self.up
    puts "Adding cached feeds table..."
    create_table :cached_feeds do |t|
      t.column :href, :string
      t.column :title, :string
      t.column :link, :string
      t.column :feed_data, :text
      t.column :feed_data_type, :string
      t.column :http_headers, :text
      t.column :last_retrieved, :datetime
      t.column :time_to_live, :integer
      t.column :serialized, :text
    end
  end

  def self.down
    puts "Dropping cached feeds table..."
    drop_table :cached_feeds
  end
end