mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Merge branch 'master' of github.com:internetee/registry
This commit is contained in:
commit
e33ab4dce9
44 changed files with 238 additions and 150 deletions
12
db/migrate/20141218154829_populate_roles.rb
Normal file
12
db/migrate/20141218154829_populate_roles.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
class PopulateRoles < ActiveRecord::Migration
|
||||
def change
|
||||
rename_column :roles, :name, :code
|
||||
remove_column :users, :admin, :boolean
|
||||
|
||||
Role.create(code: 'admin')
|
||||
Role.create(code: 'user')
|
||||
Role.create(code: 'customer_service')
|
||||
|
||||
User.update_all(role_id: Role.first.id)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue