[Git][noosfero/noosfero][master] 2 commits: Speed up role assignments fetch

Bráulio Bhavamitra gitlab at gitlab.com
Tue Jun 16 14:12:26 BRT 2015


Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero


Commits:
762d2b33 by Braulio Bhavamitra at 2014-07-08T09:43:20Z
Speed up role assignments fetch

(ActionItem3197)

- - - - -
55dc89bc by Bráulio Bhavamitra at 2015-06-16T17:12:06Z
Merge branch 'ai3197' into 'master'

Speed up role assignments fetch

http://noosfero.org/Development/ActionItem3197

See merge request !252

- - - - -


1 changed file:

- + db/migrate/20140708123314_index_role_assignments_filtered_fields.rb


Changes:

=====================================
db/migrate/20140708123314_index_role_assignments_filtered_fields.rb
=====================================
--- /dev/null
+++ b/db/migrate/20140708123314_index_role_assignments_filtered_fields.rb
@@ -0,0 +1,15 @@
+class IndexRoleAssignmentsFilteredFields < ActiveRecord::Migration
+
+  def self.up
+    add_index :role_assignments, [:accessor_id, :accessor_type]
+    add_index :role_assignments, [:accessor_id, :accessor_type, :role_id]
+    add_index :role_assignments, [:resource_id, :resource_type]
+    add_index :role_assignments, [:resource_id, :resource_type, :role_id]
+    add_index :role_assignments, [:accessor_id, :accessor_type, :resource_id, :resource_type]
+    add_index :profiles, [:type]
+    add_index :profiles, [:visible]
+    add_index :profiles, [:enabled]
+    add_index :profiles, [:validated]
+  end
+
+end



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/ee80381ab7b70b1ef09889b2fa0d74c202e0a349...55dc89bcc13e9278a24a6b48102be90b3469d952
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150616/313512c7/attachment-0001.html>


More information about the Noosfero-dev mailing list