can_create_group, can_create_team boolean fields for user

This commit is contained in:
Dmitriy Zaporozhets 2013-01-25 11:08:22 +02:00
parent aa1f1eb680
commit 585a53c415
2 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,11 @@
class AddUserPermissions < ActiveRecord::Migration
def up
add_column :users, :can_create_group, :boolean, default: true, null: false
add_column :users, :can_create_team, :boolean, default: true, null: false
end
def down
remove_column :users, :can_create_group
remove_column :users, :can_create_team
end
end

View file

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130110172407) do ActiveRecord::Schema.define(:version => 20130125090214) do
create_table "events", :force => true do |t| create_table "events", :force => true do |t|
t.string "target_type" t.string "target_type"
@ -267,6 +267,8 @@ ActiveRecord::Schema.define(:version => 20130110172407) do
t.string "extern_uid" t.string "extern_uid"
t.string "provider" t.string "provider"
t.string "username" t.string "username"
t.boolean "can_create_group", :default => true, :null => false
t.boolean "can_create_team", :default => true, :null => false
end end
add_index "users", ["admin"], :name => "index_users_on_admin" add_index "users", ["admin"], :name => "index_users_on_admin"