fix: projects load by invite code slowly

This commit is contained in:
2021-06-15 15:33:23 +08:00
parent 7c43f2d8fc
commit 818317c292
3 changed files with 84 additions and 74 deletions

View File

@@ -0,0 +1,8 @@
class AddInviteCodeIndexToProjects < ActiveRecord::Migration[5.2]
def change
add_index :projects, :invite_code
execute <<-SQL
ALTER TABLE projects MODIFY COLUMN invite_code VARCHAR(255) BINARY CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL;
SQL
end
end