Sha256: 38df152660f30322c97a3e81d3c5ce7bbea11fc86aa7ba86e29a5399f33447e6

Contents?: true

Size: 731 Bytes

Versions: 5

Compression:

Stored size: 731 Bytes

Contents

ActiveRecord::Schema.define(:version => 0) do
  create_table :users do |t|
    t.string :name
  end

  create_table :posts do |t|
    t.string :title
  end

  create_table :tokens do |t|
    t.string      :name, null: false
    t.belongs_to  :tokenizable, null: false, polymorphic: true
    t.string      :token, null: false
    t.text        :data, null: true
    t.datetime    :expires_at, null: true
    t.datetime    :created_at, null: false
  end

  add_index :tokens, :tokenizable_type
  add_index :tokens, :tokenizable_id
  add_index :tokens, [:tokenizable_type, :tokenizable_id]
  add_index :tokens, :token
  add_index :tokens, :expires_at
  add_index :tokens, [:tokenizable_id, :tokenizable_type, :name], unique: true
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mongoid-tokens-1.0.0 spec/schema.rb
tokens-2.1.1 spec/schema.rb
tokens-2.1.0 spec/schema.rb
tokens-2.0.1 spec/schema.rb
tokens-2.0.0 spec/schema.rb