mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
13 lines
372 B
Ruby
13 lines
372 B
Ruby
class CreateUserOrganizations < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :user_teams do |t|
|
|
t.column :role, :integer, null: false, default: 1
|
|
t.integer :user_id, null: false
|
|
t.integer :team_id, null: false
|
|
|
|
t.timestamps null: false
|
|
end
|
|
add_foreign_key :user_teams, :users
|
|
add_foreign_key :user_teams, :teams
|
|
end
|
|
end
|