db migration to add index on user_id of user_assets table

This commit is contained in:
Nuwan Chathuranga 2021-06-11 20:06:59 +05:30
parent 6e59503062
commit 838d7d27c5
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
class AddIndexOnUserAssetsUserId < ActiveRecord::Migration
def self.up
execute("CREATE INDEX index_user_assets_user_id ON public.user_assets USING btree (user_id);");
end
def self.down
execute("DROP INDEX index_user_assets_user_id")
end
end