Skip to content

Commit

Permalink
Remove index on invitations_count column as it's probably not needed …
Browse files Browse the repository at this point in the history
…by everyone
  • Loading branch information
amitsaxena authored and scambra committed Nov 20, 2020
1 parent 7777c1d commit 9cf2785
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/generators/active_record/templates/migration.rb
Expand Up @@ -8,7 +8,6 @@ def up
t.integer :invitation_limit
t.references :invited_by, polymorphic: true
t.integer :invitations_count, default: 0
t.index :invitations_count
t.index :invitation_token, unique: true # for invitable
t.index :invited_by_id
end
Expand Down
2 changes: 0 additions & 2 deletions test/rails_app/db/migrate/20100401102949_create_tables.rb
Expand Up @@ -32,7 +32,6 @@ def change
t.timestamps :null => false
end
add_index :users, :invitation_token, :unique => true
add_index :users, :invitations_count

create_table :admins do |t|
## Database authenticatable
Expand All @@ -41,6 +40,5 @@ def change

t.integer :invitations_count, :default => 0
end
add_index :admins, :invitations_count
end
end

0 comments on commit 9cf2785

Please sign in to comment.