Sha256: 42497982a1d692e3f6e6c308792ee96aab2e115202443e246c0e916805794aea

Contents?: true

Size: 372 Bytes

Versions: 295

Compression:

Stored size: 372 Bytes

Contents

class AddSessionsTable < ActiveRecord::Migration
  def change
    if !ActiveRecord::Base.connection.table_exists?('sessions')
      create_table :sessions do |t|
        t.string :session_id, :null => false
        t.text :data
        t.timestamps
      end
      add_index :sessions, :session_id, :unique => true
      add_index :sessions, :updated_at
    end
  end
end

Version data entries

295 entries across 295 versions & 4 rubygems

Version Path
zuora_connect-1.7.88a db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.88 db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.87 db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.86 db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.85 db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.84 db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.84e db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.84d db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.84c db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.84b db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.83 db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.82 db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.81aa db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.81z db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.81y db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.81x db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.81w db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.81v db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.81u db/migrate/20110131211919_add_sessions_table.rb
zuora_connect-1.7.81t db/migrate/20110131211919_add_sessions_table.rb