Sha256: ad93e838b6ebd007610645f6f9a531217556f918899f93d8dd4694a9d188934f
Contents?: true
Size: 635 Bytes
Versions: 66
Compression:
Stored size: 635 Bytes
Contents
class CreateFeatures < ActiveRecord::Migration[5.0] def change create_table(:features) do |t| t.string :name t.string :status, :null => false, :default=>"unpublished", :limit=>16 t.timestamps end create_table :permissions do |t| t.belongs_to :user, index: true t.belongs_to :feature, index: true t.boolean :can_create, default: false t.boolean :can_read, default: true t.boolean :can_update, default: false t.boolean :can_delete, default: false t.timestamps end add_index(:permissions, [ :user_id, :feature_id ], :unique => true) end end
Version data entries
66 entries across 66 versions & 1 rubygems