Sha256: 412d0f1b56f2bcb5ef9ed70149d512430917a88e090af330f34b6c31c82ebc76

Contents?: true

Size: 1.16 KB

Versions: 10

Compression:

Stored size: 1.16 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 -%>

      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.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

10 entries across 10 versions & 2 rubygems

Version Path
mbleigh-twitter-auth-0.1.10 generators/twitter_auth/templates/migration.rb
mbleigh-twitter-auth-0.1.11 generators/twitter_auth/templates/migration.rb
mbleigh-twitter-auth-0.1.12 generators/twitter_auth/templates/migration.rb
mbleigh-twitter-auth-0.1.13 generators/twitter_auth/templates/migration.rb
mbleigh-twitter-auth-0.1.14 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.10 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.11 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.12 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.13 generators/twitter_auth/templates/migration.rb
twitter-auth-0.1.14 generators/twitter_auth/templates/migration.rb