Sha256: 5b6b572896bb7a8f7b6b261b86d92d2235ceafc5e4289923a4bd0c2a7d4306fe

Contents?: true

Size: 1.09 KB

Versions: 8

Compression:

Stored size: 1.09 KB

Contents

class TwitterAuthMigration < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.string :login
<% if options[:oauth] -%>
      t.string :access_token
      t.string :access_secret
<% elsif options[:basic] -%>
      t.binary :crypted_password
      t.string :salt
<% end -%>

      # This information is automatically kept
      # in-sync at each login of the user. You
      # may remove any/all of these columns.
      t.string :name
      t.string :location
      t.string :description
      t.string :profile_image_url
      t.string :url
      t.boolean :protected
      t.string :profile_background_color
      t.string :profile_sidebar_fill_color
      t.string :profile_link_color
      t.string :profile_sidebar_border_color
      t.string :profile_text_color
      t.integer :friends_count
      t.integer :statuses_count
      t.integer :followers_count
      t.integer :favourites_count

      # Probably don't need both, but they're here.
      t.integer :utc_offset
      t.string :time_zone

      t.timestamps
    end
  end

  def self.down
    drop_table :users
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
mbleigh-twitter-auth-0.1.1 generators/twitter_auth/templates/migration.rb
mbleigh-twitter-auth-0.1.3 generators/twitter_auth/templates/migration.rb
mbleigh-twitter-auth-0.1.5 generators/twitter_auth/templates/migration.rb
mbleigh-twitter-auth-0.1.8 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.5 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.7 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.8 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.9 generators/twitter_auth/templates/migration.rb