Class: CreateTweets

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/twitter/cli/migrations/20080722194508_create_tweets.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/twitter/cli/migrations/20080722194508_create_tweets.rb', line 13

def self.down
  drop_table :tweets
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/twitter/cli/migrations/20080722194508_create_tweets.rb', line 2

def self.up
  create_table :tweets do |t|
    t.datetime :occurred_at
    t.boolean :truncated, :favorited, :user_protected, :default => false
    t.integer :twitter_id, :user_id, :in_reply_to_status_id, :in_reply_to_user_id, :user_followers_count
    t.text :body
    t.string :source, :user_name, :user_screen_name, :user_location, :user_description, :user_profile_image_url, :user_url
    t.timestamps
  end
end