Skip to content

Commit 4581cdd

Browse files
committed
adding workspace id to teams table
1 parent edd0a5b commit 4581cdd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

db/migrate/20251028201000_create_team.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ class CreateTeam < ActiveRecord::Migration[7.1]
22
def up
33
create_table :teams, primary_key: :id do |t|
44
t.integer :id
5+
t.integer :workspace_id
56
t.string :name
67
end
78

8-
add_index :teams, :name, unique: true
9+
add_index :teams, [:name, :workspace_id], unique: true
10+
add_index :teams, :workspace_id
911

1012
create_table :team_user do |t|
1113
t.integer :team_id, null: false

0 commit comments

Comments
 (0)