Sha256: 4aca961f327ddec091a915ebbcb7fdecc00a2f1c09722bba5f2fd934f61bdc04
Contents?: true
Size: 523 Bytes
Versions: 9
Compression:
Stored size: 523 Bytes
Contents
class ZuulPermissionCreate<%= table_name.camelize %> < ActiveRecord::Migration def change create_table(:<%= table_name %>) do |t| <%= migration_data -%> <% attributes.each do |attribute| -%> t.<%= attribute.type %> :<%= attribute.name %> <% end -%> t.timestamps end add_index :<%= table_name %>, :slug add_index :<%= table_name %>, :context_type add_index :<%= table_name %>, :context_id add_index :<%= table_name %>, [:slug, :context_type, :context_id], :unique => true end end
Version data entries
9 entries across 9 versions & 1 rubygems