Sha256: 52fc63d3933f5c4278ba7061a196479d2a6e076eb84914465c1c2ab120d6267d

Contents?: true

Size: 290 Bytes

Versions: 5

Compression:

Stored size: 290 Bytes

Contents

class CreateTokens < ActiveRecord::Migration
  def self.up
    create_table :tokens do |t|
      t.string :value
      t.datetime :expires
      t.integer :host_id
    end
    add_index :tokens, :value
    add_index :tokens, :host_id
  end

  def self.down
    drop_table :tokens
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/db/migrate/20120921105349_create_tokens.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/db/migrate/20120921105349_create_tokens.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/db/migrate/20120921105349_create_tokens.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/db/migrate/20120921105349_create_tokens.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/db/migrate/20120921105349_create_tokens.rb