Sha256: 93c5a33bc250689f3620db45c8742509225299ea1e639b459669a20b40747e89

Contents?: true

Size: 1.27 KB

Versions: 3

Compression:

Stored size: 1.27 KB

Contents

class TwitterAuthMigration < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.string :twitter_id
      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 -%>

      t.string :remember_token
      t.datetime :remember_token_expires_at

      # 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.string :profile_background_image_url
      t.boolean :profile_background_tile
      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

3 entries across 3 versions & 1 rubygems

Version Path
twitter-auth-with-mongo-mapper-0.1.1 generators/twitter_auth/templates/migration.rb
twitter-auth-with-mongo-mapper-0.1.0 generators/twitter_auth/templates/migration.rb
twitter-auth-with-mongo-mapper-0.0.9 generators/twitter_auth/templates/migration.rb