Sha256: f379716e44f4cd41b1b78444b4b1a146d8b811b25f271911d4e3fcae7b28a8e3
Contents?: true
Size: 555 Bytes
Versions: 1
Compression:
Stored size: 555 Bytes
Contents
class GroupifyMigration < ActiveRecord::Migration def change create_table :groups do |t| t.string :type t.timestamps end create_table :group_memberships do |t| t.references :member, polymorphic: true, index: true, null: false t.references :group, polymorphic: true, index: true # The named group to which a member belongs (if using) t.string :group_name, index: true # The membership type the member belongs with t.string :membership_type t.timestamps end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
groupify-0.9.0 | lib/generators/groupify/active_record/migration/templates/migration.rb |