Eric-Guo/wechat

View on GitHub
lib/generators/wechat/templates/db/session_migration.rb.erb

Summary

Maintainability
Test Coverage
class CreateWechatSessions < ActiveRecord::Migration<%= migration_version %>
  def change
    create_table :wechat_sessions do |t|
      t.string :openid, null: false
      t.string :hash_store
      t.timestamps null: false
    end
    add_index :wechat_sessions, :openid, unique: true
  end
end