5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 18:36:23 +00:00
panel/db/migrate/20190706000159_create_roles.rb

20 lines
400 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# Crea la tabla de roles
class CreateRoles < ActiveRecord::Migration[5.2]
2019-07-08 16:40:41 +00:00
def up
create_table :roles do |t|
t.timestamps
t.belongs_to :site
t.belongs_to :usuarie
t.string :rol
t.boolean :temporal
# Solo podemos tener un rol a la vez
t.index %i[site_id usuarie_id], unique: true
end
end
2019-07-08 16:40:41 +00:00
def down; end
end