we_bridge_rails_engine_orgs 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/assets/javascripts/org_department_positions.js +2 -0
  4. data/app/assets/javascripts/org_departments.js +2 -0
  5. data/app/assets/stylesheets/org_department_positions.css +4 -0
  6. data/app/assets/stylesheets/org_departments.css +4 -0
  7. data/app/controllers/org_department_positions_controller.rb +58 -0
  8. data/app/controllers/org_departments_controller.rb +58 -0
  9. data/app/helpers/org_department_positions_helper.rb +2 -0
  10. data/app/helpers/org_departments_helper.rb +2 -0
  11. data/app/models/org.rb +11 -3
  12. data/app/models/org_branch.rb +15 -0
  13. data/app/models/org_department.rb +19 -0
  14. data/app/models/org_department_position.rb +26 -0
  15. data/app/models/org_department_position_member_mapping.rb +7 -0
  16. data/app/models/org_department_position_text.rb +10 -0
  17. data/app/models/org_department_text.rb +11 -0
  18. data/app/models/org_member.rb +5 -0
  19. data/app/views/org_department_positions/_form.html.builder +14 -0
  20. data/app/views/org_department_positions/edit.html.builder +7 -0
  21. data/app/views/org_department_positions/index.html.builder +25 -0
  22. data/app/views/org_department_positions/new.html.builder +5 -0
  23. data/app/views/org_department_positions/show.html.builder +8 -0
  24. data/app/views/org_departments/_form.html.builder +14 -0
  25. data/app/views/org_departments/edit.html.builder +7 -0
  26. data/app/views/org_departments/index.html.builder +25 -0
  27. data/app/views/org_departments/new.html.builder +5 -0
  28. data/app/views/org_departments/show.html.builder +8 -0
  29. data/config/routes.rb +3 -0
  30. data/db/migrate/20151204183447_create_org_departments.rb +18 -0
  31. data/db/migrate/20151204183612_create_org_department_positions.rb +26 -0
  32. data/lib/we_bridge_rails_engine_orgs/version.rb +1 -1
  33. data/spec/controllers/org_department_positions_controller_spec.rb +159 -0
  34. data/spec/controllers/org_departments_controller_spec.rb +159 -0
  35. data/spec/dummy/db/development.sqlite3 +0 -0
  36. data/spec/dummy/db/schema.rb +47 -1
  37. data/spec/dummy/db/test.sqlite3 +0 -0
  38. data/spec/dummy/log/development.log +1262 -0
  39. data/spec/dummy/log/test.log +3269 -0
  40. data/spec/factories/org_department_positions.rb +6 -0
  41. data/spec/factories/org_departments.rb +6 -0
  42. data/spec/helpers/org_department_positions_helper_spec.rb +15 -0
  43. data/spec/helpers/org_departments_helper_spec.rb +15 -0
  44. data/spec/models/org_branch_spec.rb +26 -1
  45. data/spec/models/org_department_position_spec.rb +5 -0
  46. data/spec/models/org_department_spec.rb +32 -0
  47. data/spec/models/org_member_spec.rb +18 -1
  48. data/spec/models/org_spec.rb +39 -1
  49. data/spec/routing/org_department_positions_routing_spec.rb +39 -0
  50. data/spec/routing/org_departments_routing_spec.rb +39 -0
  51. data/spec/views/org_department_positions/edit.html.builder_spec.rb +14 -0
  52. data/spec/views/org_department_positions/index.html.builder_spec.rb +14 -0
  53. data/spec/views/org_department_positions/new.html.builder_spec.rb +14 -0
  54. data/spec/views/org_department_positions/show.html.builder_spec.rb +11 -0
  55. data/spec/views/org_departments/edit.html.builder_spec.rb +14 -0
  56. data/spec/views/org_departments/index.html.builder_spec.rb +14 -0
  57. data/spec/views/org_departments/new.html.builder_spec.rb +14 -0
  58. data/spec/views/org_departments/show.html.builder_spec.rb +11 -0
  59. metadata +65 -4
  60. data/spec/dummy/tmp/pids/server.pid +0 -1
Binary file
@@ -29731,3 +29731,1265 @@ Completed 200 OK in 181ms (Views: 175.5ms | ActiveRecord: 2.1ms)
29731
29731
 
29732
29732
 
29733
29733
  Started GET "/assets/application.self-1da6d28687370077cd6ba59def469f872870ada4ce65335c79d77914791d0983.js?body=1" for ::1 at 2015-12-04 11:57:06 +0900
29734
+ Org Load (0.6ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29735
+ Org Load (0.4ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29736
+ OrgMember Load (0.6ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29737
+ Org Load (0.3ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29738
+ OrgMember Load (0.1ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29739
+ Org Load (0.4ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29740
+ OrgMember Load (0.6ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29741
+ Org Load (0.6ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29742
+ OrgMember Load (0.6ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29743
+ Org Load (0.6ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29744
+ OrgMember Load (0.5ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29745
+ Org Load (0.5ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29746
+ OrgMember Load (0.5ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29747
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29748
+ OrgMember Load (0.2ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29749
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29750
+ OrgMember Load (0.3ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29751
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29752
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29753
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29754
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29755
+ OrgMember Load (0.2ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? ORDER BY "org_members"."org_director_type.position" ASC [["org_id", 1]]
29756
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29757
+ OrgMember Load (0.2ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? ORDER BY org_director_type.position ASC [["org_id", 1]]
29758
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29759
+ OrgMember Load (0.2ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? ORDER BY org_director_types.position ASC [["org_id", 1]]
29760
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29761
+ OrgMember Load (0.1ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? ORDER BY "org_members"."org_director_types.position" ASC [["org_id", 1]]
29762
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29763
+ OrgMember Load (0.2ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? ORDER BY org_director_types.position ASC [["org_id", 1]]
29764
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29765
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29766
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29767
+ OrgMember Load (0.2ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? ORDER BY org_director_types.position ASC [["org_id", 1]]
29768
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29769
+ OrgMember Load (0.2ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? ORDER BY org_director_types.position ASC [["org_id", 1]]
29770
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29771
+ OrgMember Load (0.2ms) SELECT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? ORDER BY org_director_types.position ASC, org_director_types.id [["org_id", 1]]
29772
+ OrgBranch Load (1.7ms) SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC LIMIT 1
29773
+ OrgBranch Load (1.3ms) SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29774
+ OrgBranch Load (0.6ms) SELECT "org_branches".* FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29775
+ OrgBranch Load (0.5ms) SELECT "org_branches".* FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" INNER JOIN "org_members" ON "org_members"."id" = "org_branch_member_mappings"."org_member_id" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29776
+  (0.6ms) SELECT COUNT(*) FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" INNER JOIN "org_members" ON "org_members"."id" = "org_branch_member_mappings"."org_member_id"
29777
+  (7.7ms) SELECT COUNT(*) FROM "org_branches"
29778
+  (0.3ms) begin transaction
29779
+ SQL (0.8ms) INSERT INTO "org_branches" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-12-04 16:36:53.294789"], ["updated_at", "2015-12-04 16:36:53.294789"]]
29780
+  (0.2ms) rollback transaction
29781
+ OrgBranch Load (10.1ms) SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC LIMIT 1
29782
+  (0.4ms) begin transaction
29783
+ SQL (1.5ms) INSERT INTO "org_branches" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?) [["org_id", 1], ["created_at", "2015-12-04 17:00:26.288189"], ["updated_at", "2015-12-04 17:00:26.288189"]]
29784
+  (0.2ms) rollback transaction
29785
+  (0.2ms) begin transaction
29786
+ SQL (1.0ms) INSERT INTO "org_branches" ("org_id", "org_branch_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["org_branch_type_id", 1], ["created_at", "2015-12-04 17:00:47.348417"], ["updated_at", "2015-12-04 17:00:47.348417"]]
29787
+  (0.9ms) commit transaction
29788
+ OrgBranch Load (0.5ms) SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC LIMIT 1
29789
+ OrgBranch Load (0.3ms) SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC LIMIT 1
29790
+ OrgBranch Load (1.1ms) SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC LIMIT 1
29791
+ OrgBranchMemberMapping Load (0.6ms) SELECT "org_branch_member_mappings".* FROM "org_branch_member_mappings" WHERE "org_branch_member_mappings"."org_member_id" = ? AND "org_branch_member_mappings"."org_branch_id" = ? LIMIT 1 [["org_member_id", 1], ["org_branch_id", 1]]
29792
+  (0.1ms) begin transaction
29793
+ SQL (1.6ms) INSERT INTO "org_branch_member_mappings" ("org_member_id", "org_branch_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_member_id", 1], ["org_branch_id", 1], ["created_at", "2015-12-04 17:02:51.494056"], ["updated_at", "2015-12-04 17:02:51.494056"]]
29794
+  (1.0ms) commit transaction
29795
+ OrgBranch Load (0.4ms) SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC LIMIT 1
29796
+ OrgBranch Load (1.4ms) SELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC LIMIT 1
29797
+ OrgBranchMemberMapping Load (0.2ms) SELECT "org_branch_member_mappings".* FROM "org_branch_member_mappings" WHERE "org_branch_member_mappings"."org_member_id" = ? AND "org_branch_member_mappings"."org_branch_id" = ? LIMIT 1 [["org_member_id", 11], ["org_branch_id", 1]]
29798
+  (0.1ms) begin transaction
29799
+ SQL (0.4ms) INSERT INTO "org_branch_member_mappings" ("org_member_id", "org_branch_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_member_id", 11], ["org_branch_id", 1], ["created_at", "2015-12-04 17:03:53.159183"], ["updated_at", "2015-12-04 17:03:53.159183"]]
29800
+  (0.9ms) commit transaction
29801
+ OrgBranch Load (0.7ms) SELECT "org_branches".* FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" INNER JOIN "org_members" ON "org_members"."id" = "org_branch_member_mappings"."org_member_id" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29802
+ OrgBranch Load (0.1ms) SELECT "org_branches".* FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" INNER JOIN "org_members" ON "org_members"."id" = "org_branch_member_mappings"."org_member_id" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29803
+ OrgBranch Load (0.1ms) SELECT "org_branches".* FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" INNER JOIN "org_members" ON "org_members"."id" = "org_branch_member_mappings"."org_member_id" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29804
+ OrgBranch Load (0.1ms) SELECT "org_branches".* FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" INNER JOIN "org_members" ON "org_members"."id" = "org_branch_member_mappings"."org_member_id" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29805
+ OrgBranch Load (0.1ms) SELECT "org_branches".* FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" INNER JOIN "org_members" ON "org_members"."id" = "org_branch_member_mappings"."org_member_id" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29806
+ OrgBranch Load (0.3ms) SELECT "org_branches".* FROM "org_branches" INNER JOIN "org_branch_member_mappings" ON "org_branch_member_mappings"."org_branch_id" = "org_branches"."id" INNER JOIN "org_members" ON "org_members"."id" = "org_branch_member_mappings"."org_member_id" GROUP BY "org_branches"."id" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC
29807
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29808
+  (0.6ms) SELECT COUNT(*) FROM "org_director_types" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29809
+ OrgMember Load (0.3ms) SELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? AND "org_director_type"."id" = 0 ORDER BY org_director_types.id ASC LIMIT 1 [["org_id", 1]]
29810
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29811
+  (0.6ms) SELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29812
+ OrgMember Load (0.7ms) SELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? AND "org_director_types"."position" IS NULL ORDER BY org_director_types.id ASC LIMIT 1 [["org_id", 1]]
29813
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29814
+  (0.6ms) SELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29815
+ OrgMember Load (0.3ms) SELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? AND "org_director_types"."position" IS NULL ORDER BY org_director_types.id ASC LIMIT 1 [["org_id", 1]]
29816
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29817
+  (0.5ms) SELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
29818
+ OrgMember Load (0.4ms) SELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_director_types"."org_id" = ? AND "org_director_types"."position" IS NULL ORDER BY org_director_types.id ASC LIMIT 1 [["org_id", 1]]
29819
+ Org Load (0.2ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29820
+ OrgActivity Load (3.3ms) SELECT "org_activities".* FROM "org_activities" WHERE "org_activities"."org_id" = ? [["org_id", 1]]
29821
+ Org Load (0.1ms) SELECT "orgs".* FROM "orgs" ORDER BY "orgs"."id" ASC LIMIT 1
29822
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
29823
+ Migrating to CreateOrgDepartments (20151204183447)
29824
+  (0.1ms) begin transaction
29825
+  (0.5ms) CREATE TABLE "org_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_id" integer NOT NULL, "manager_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
29826
+  (0.2ms) CREATE TABLE "org_department_texts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parent_id" integer NOT NULL, "lang_id" integer NOT NULL, "name" varchar DEFAULT '' NOT NULL, "desc" text DEFAULT '' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
29827
+  (0.1ms) select sqlite_version(*)
29828
+  (2.2ms) CREATE UNIQUE INDEX "index_org_department_texts" ON "org_department_texts" ("lang_id", "parent_id")
29829
+  (0.3ms) CREATE TABLE "org_department_member_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_department_id" integer NOT NULL, "org_manager_id" integer NOT NULL, "position" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
29830
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151204183447"]]
29831
+  (2.0ms) commit transaction
29832
+ Migrating to CreateOrgDepartmentPositions (20151204183612)
29833
+  (0.1ms) begin transaction
29834
+  (0.5ms) CREATE TABLE "org_department_positions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_department_id" integer NOT NULL, "position" integer DEFAULT 0 NOT NULL, "limit" integer DEFAULT 0 NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
29835
+  (0.2ms) CREATE TABLE "org_department_position_texts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parent_id" integer NOT NULL, "lang_id" integer NOT NULL, "name" varchar DEFAULT '' NOT NULL, "desc" text DEFAULT '' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
29836
+  (0.6ms) CREATE UNIQUE INDEX "index_org_department_position_texts" ON "org_department_position_texts" ("lang_id", "parent_id")
29837
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151204183612"]]
29838
+  (2.2ms) commit transaction
29839
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
29840
+  (0.1ms)  SELECT sql
29841
+ FROM sqlite_master
29842
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
29843
+ UNION ALL
29844
+ SELECT sql
29845
+ FROM sqlite_temp_master
29846
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
29847
+ 
29848
+  (0.1ms) SELECT sql
29849
+ FROM sqlite_master
29850
+ WHERE name='index_langs_on_code' AND type='index'
29851
+ UNION ALL
29852
+ SELECT sql
29853
+ FROM sqlite_temp_master
29854
+ WHERE name='index_langs_on_code' AND type='index'
29855
+
29856
+  (0.1ms)  SELECT sql
29857
+ FROM sqlite_master
29858
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
29859
+ UNION ALL
29860
+ SELECT sql
29861
+ FROM sqlite_temp_master
29862
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
29863
+ 
29864
+  (0.1ms) SELECT sql
29865
+ FROM sqlite_master
29866
+ WHERE name='index_org_branch_member_mappings' AND type='index'
29867
+ UNION ALL
29868
+ SELECT sql
29869
+ FROM sqlite_temp_master
29870
+ WHERE name='index_org_branch_member_mappings' AND type='index'
29871
+
29872
+  (0.1ms)  SELECT sql
29873
+ FROM sqlite_master
29874
+ WHERE name='index_org_branch_texts' AND type='index'
29875
+ UNION ALL
29876
+ SELECT sql
29877
+ FROM sqlite_temp_master
29878
+ WHERE name='index_org_branch_texts' AND type='index'
29879
+ 
29880
+  (0.9ms) SELECT sql
29881
+ FROM sqlite_master
29882
+ WHERE name='index_org_branch_type_texts' AND type='index'
29883
+ UNION ALL
29884
+ SELECT sql
29885
+ FROM sqlite_temp_master
29886
+ WHERE name='index_org_branch_type_texts' AND type='index'
29887
+
29888
+  (0.1ms)  SELECT sql
29889
+ FROM sqlite_master
29890
+ WHERE name='index_org_department_position_texts' AND type='index'
29891
+ UNION ALL
29892
+ SELECT sql
29893
+ FROM sqlite_temp_master
29894
+ WHERE name='index_org_department_position_texts' AND type='index'
29895
+ 
29896
+  (0.2ms) SELECT sql
29897
+ FROM sqlite_master
29898
+ WHERE name='index_org_department_texts' AND type='index'
29899
+ UNION ALL
29900
+ SELECT sql
29901
+ FROM sqlite_temp_master
29902
+ WHERE name='index_org_department_texts' AND type='index'
29903
+
29904
+  (0.2ms)  SELECT sql
29905
+ FROM sqlite_master
29906
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
29907
+ UNION ALL
29908
+ SELECT sql
29909
+ FROM sqlite_temp_master
29910
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
29911
+ 
29912
+  (0.2ms) SELECT sql
29913
+ FROM sqlite_master
29914
+ WHERE name='index_org_member_tag_mappings' AND type='index'
29915
+ UNION ALL
29916
+ SELECT sql
29917
+ FROM sqlite_temp_master
29918
+ WHERE name='index_org_member_tag_mappings' AND type='index'
29919
+
29920
+  (0.2ms)  SELECT sql
29921
+ FROM sqlite_master
29922
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
29923
+ UNION ALL
29924
+ SELECT sql
29925
+ FROM sqlite_temp_master
29926
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
29927
+ 
29928
+  (0.2ms) SELECT sql
29929
+ FROM sqlite_master
29930
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
29931
+ UNION ALL
29932
+ SELECT sql
29933
+ FROM sqlite_temp_master
29934
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
29935
+
29936
+  (0.2ms)  SELECT sql
29937
+ FROM sqlite_master
29938
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
29939
+ UNION ALL
29940
+ SELECT sql
29941
+ FROM sqlite_temp_master
29942
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
29943
+ 
29944
+  (0.1ms) SELECT sql
29945
+ FROM sqlite_master
29946
+ WHERE name='index_org_texts' AND type='index'
29947
+ UNION ALL
29948
+ SELECT sql
29949
+ FROM sqlite_temp_master
29950
+ WHERE name='index_org_texts' AND type='index'
29951
+
29952
+  (0.1ms)  SELECT sql
29953
+ FROM sqlite_master
29954
+ WHERE name='idx_person_name_texts' AND type='index'
29955
+ UNION ALL
29956
+ SELECT sql
29957
+ FROM sqlite_temp_master
29958
+ WHERE name='idx_person_name_texts' AND type='index'
29959
+ 
29960
+  (0.1ms) SELECT sql
29961
+ FROM sqlite_master
29962
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
29963
+ UNION ALL
29964
+ SELECT sql
29965
+ FROM sqlite_temp_master
29966
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
29967
+
29968
+  (0.1ms)  SELECT sql
29969
+ FROM sqlite_master
29970
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
29971
+ UNION ALL
29972
+ SELECT sql
29973
+ FROM sqlite_temp_master
29974
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
29975
+ 
29976
+  (0.2ms) SELECT sql
29977
+ FROM sqlite_master
29978
+ WHERE name='index_user_accounts_on_uid' AND type='index'
29979
+ UNION ALL
29980
+ SELECT sql
29981
+ FROM sqlite_temp_master
29982
+ WHERE name='index_user_accounts_on_uid' AND type='index'
29983
+
29984
+  (0.1ms)  SELECT sql
29985
+ FROM sqlite_master
29986
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
29987
+ UNION ALL
29988
+ SELECT sql
29989
+ FROM sqlite_temp_master
29990
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
29991
+ 
29992
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
29993
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
29994
+ Migrating to CreateOrgDepartmentPositions (20151204183612)
29995
+  (0.1ms) begin transaction
29996
+  (0.1ms) SELECT sql
29997
+ FROM sqlite_master
29998
+ WHERE name='index_org_department_position_texts' AND type='index'
29999
+ UNION ALL
30000
+ SELECT sql
30001
+ FROM sqlite_temp_master
30002
+ WHERE name='index_org_department_position_texts' AND type='index'
30003
+
30004
+  (0.8ms) DROP INDEX "index_org_department_position_texts"
30005
+  (4.4ms) DROP TABLE "org_department_position_texts"
30006
+  (0.8ms) DROP TABLE "org_department_positions"
30007
+ SQL (0.7ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20151204183612"]]
30008
+  (1.5ms) commit transaction
30009
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
30010
+  (0.2ms)  SELECT sql
30011
+ FROM sqlite_master
30012
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30013
+ UNION ALL
30014
+ SELECT sql
30015
+ FROM sqlite_temp_master
30016
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30017
+ 
30018
+  (1.7ms) SELECT sql
30019
+ FROM sqlite_master
30020
+ WHERE name='index_langs_on_code' AND type='index'
30021
+ UNION ALL
30022
+ SELECT sql
30023
+ FROM sqlite_temp_master
30024
+ WHERE name='index_langs_on_code' AND type='index'
30025
+
30026
+  (0.1ms)  SELECT sql
30027
+ FROM sqlite_master
30028
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30029
+ UNION ALL
30030
+ SELECT sql
30031
+ FROM sqlite_temp_master
30032
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30033
+ 
30034
+  (0.1ms) SELECT sql
30035
+ FROM sqlite_master
30036
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30037
+ UNION ALL
30038
+ SELECT sql
30039
+ FROM sqlite_temp_master
30040
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30041
+
30042
+  (0.1ms)  SELECT sql
30043
+ FROM sqlite_master
30044
+ WHERE name='index_org_branch_texts' AND type='index'
30045
+ UNION ALL
30046
+ SELECT sql
30047
+ FROM sqlite_temp_master
30048
+ WHERE name='index_org_branch_texts' AND type='index'
30049
+ 
30050
+  (0.1ms) SELECT sql
30051
+ FROM sqlite_master
30052
+ WHERE name='index_org_branch_type_texts' AND type='index'
30053
+ UNION ALL
30054
+ SELECT sql
30055
+ FROM sqlite_temp_master
30056
+ WHERE name='index_org_branch_type_texts' AND type='index'
30057
+
30058
+  (0.3ms)  SELECT sql
30059
+ FROM sqlite_master
30060
+ WHERE name='index_org_department_texts' AND type='index'
30061
+ UNION ALL
30062
+ SELECT sql
30063
+ FROM sqlite_temp_master
30064
+ WHERE name='index_org_department_texts' AND type='index'
30065
+ 
30066
+  (0.1ms) SELECT sql
30067
+ FROM sqlite_master
30068
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30069
+ UNION ALL
30070
+ SELECT sql
30071
+ FROM sqlite_temp_master
30072
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30073
+
30074
+  (0.1ms)  SELECT sql
30075
+ FROM sqlite_master
30076
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30077
+ UNION ALL
30078
+ SELECT sql
30079
+ FROM sqlite_temp_master
30080
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30081
+ 
30082
+  (0.1ms) SELECT sql
30083
+ FROM sqlite_master
30084
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30085
+ UNION ALL
30086
+ SELECT sql
30087
+ FROM sqlite_temp_master
30088
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30089
+
30090
+  (0.1ms)  SELECT sql
30091
+ FROM sqlite_master
30092
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30093
+ UNION ALL
30094
+ SELECT sql
30095
+ FROM sqlite_temp_master
30096
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30097
+ 
30098
+  (0.1ms) SELECT sql
30099
+ FROM sqlite_master
30100
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30101
+ UNION ALL
30102
+ SELECT sql
30103
+ FROM sqlite_temp_master
30104
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30105
+
30106
+  (0.1ms)  SELECT sql
30107
+ FROM sqlite_master
30108
+ WHERE name='index_org_texts' AND type='index'
30109
+ UNION ALL
30110
+ SELECT sql
30111
+ FROM sqlite_temp_master
30112
+ WHERE name='index_org_texts' AND type='index'
30113
+ 
30114
+  (0.1ms) SELECT sql
30115
+ FROM sqlite_master
30116
+ WHERE name='idx_person_name_texts' AND type='index'
30117
+ UNION ALL
30118
+ SELECT sql
30119
+ FROM sqlite_temp_master
30120
+ WHERE name='idx_person_name_texts' AND type='index'
30121
+
30122
+  (0.1ms)  SELECT sql
30123
+ FROM sqlite_master
30124
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30125
+ UNION ALL
30126
+ SELECT sql
30127
+ FROM sqlite_temp_master
30128
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30129
+ 
30130
+  (0.1ms) SELECT sql
30131
+ FROM sqlite_master
30132
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30133
+ UNION ALL
30134
+ SELECT sql
30135
+ FROM sqlite_temp_master
30136
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30137
+
30138
+  (0.1ms)  SELECT sql
30139
+ FROM sqlite_master
30140
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30141
+ UNION ALL
30142
+ SELECT sql
30143
+ FROM sqlite_temp_master
30144
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30145
+ 
30146
+  (0.1ms) SELECT sql
30147
+ FROM sqlite_master
30148
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30149
+ UNION ALL
30150
+ SELECT sql
30151
+ FROM sqlite_temp_master
30152
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30153
+
30154
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
30155
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30156
+ Migrating to CreateOrgDepartments (20151204183447)
30157
+  (0.1ms) begin transaction
30158
+  (1.0ms) DROP TABLE "org_department_member_mappings"
30159
+  (0.2ms)  SELECT sql
30160
+ FROM sqlite_master
30161
+ WHERE name='index_org_department_texts' AND type='index'
30162
+ UNION ALL
30163
+ SELECT sql
30164
+ FROM sqlite_temp_master
30165
+ WHERE name='index_org_department_texts' AND type='index'
30166
+ 
30167
+  (1.8ms) DROP INDEX "index_org_department_texts"
30168
+  (0.8ms) DROP TABLE "org_department_texts"
30169
+  (0.7ms) DROP TABLE "org_departments"
30170
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20151204183447"]]
30171
+  (1.5ms) commit transaction
30172
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30173
+  (0.1ms) SELECT sql
30174
+ FROM sqlite_master
30175
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30176
+ UNION ALL
30177
+ SELECT sql
30178
+ FROM sqlite_temp_master
30179
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30180
+
30181
+  (0.1ms)  SELECT sql
30182
+ FROM sqlite_master
30183
+ WHERE name='index_langs_on_code' AND type='index'
30184
+ UNION ALL
30185
+ SELECT sql
30186
+ FROM sqlite_temp_master
30187
+ WHERE name='index_langs_on_code' AND type='index'
30188
+ 
30189
+  (0.1ms) SELECT sql
30190
+ FROM sqlite_master
30191
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30192
+ UNION ALL
30193
+ SELECT sql
30194
+ FROM sqlite_temp_master
30195
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30196
+
30197
+  (0.3ms)  SELECT sql
30198
+ FROM sqlite_master
30199
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30200
+ UNION ALL
30201
+ SELECT sql
30202
+ FROM sqlite_temp_master
30203
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30204
+ 
30205
+  (0.1ms) SELECT sql
30206
+ FROM sqlite_master
30207
+ WHERE name='index_org_branch_texts' AND type='index'
30208
+ UNION ALL
30209
+ SELECT sql
30210
+ FROM sqlite_temp_master
30211
+ WHERE name='index_org_branch_texts' AND type='index'
30212
+
30213
+  (0.1ms)  SELECT sql
30214
+ FROM sqlite_master
30215
+ WHERE name='index_org_branch_type_texts' AND type='index'
30216
+ UNION ALL
30217
+ SELECT sql
30218
+ FROM sqlite_temp_master
30219
+ WHERE name='index_org_branch_type_texts' AND type='index'
30220
+ 
30221
+  (0.1ms) SELECT sql
30222
+ FROM sqlite_master
30223
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30224
+ UNION ALL
30225
+ SELECT sql
30226
+ FROM sqlite_temp_master
30227
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30228
+
30229
+  (0.1ms)  SELECT sql
30230
+ FROM sqlite_master
30231
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30232
+ UNION ALL
30233
+ SELECT sql
30234
+ FROM sqlite_temp_master
30235
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30236
+ 
30237
+  (0.2ms) SELECT sql
30238
+ FROM sqlite_master
30239
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30240
+ UNION ALL
30241
+ SELECT sql
30242
+ FROM sqlite_temp_master
30243
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30244
+
30245
+  (0.2ms)  SELECT sql
30246
+ FROM sqlite_master
30247
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30248
+ UNION ALL
30249
+ SELECT sql
30250
+ FROM sqlite_temp_master
30251
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30252
+ 
30253
+  (0.3ms) SELECT sql
30254
+ FROM sqlite_master
30255
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30256
+ UNION ALL
30257
+ SELECT sql
30258
+ FROM sqlite_temp_master
30259
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30260
+
30261
+  (0.1ms)  SELECT sql
30262
+ FROM sqlite_master
30263
+ WHERE name='index_org_texts' AND type='index'
30264
+ UNION ALL
30265
+ SELECT sql
30266
+ FROM sqlite_temp_master
30267
+ WHERE name='index_org_texts' AND type='index'
30268
+ 
30269
+  (0.1ms) SELECT sql
30270
+ FROM sqlite_master
30271
+ WHERE name='idx_person_name_texts' AND type='index'
30272
+ UNION ALL
30273
+ SELECT sql
30274
+ FROM sqlite_temp_master
30275
+ WHERE name='idx_person_name_texts' AND type='index'
30276
+
30277
+  (0.1ms)  SELECT sql
30278
+ FROM sqlite_master
30279
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30280
+ UNION ALL
30281
+ SELECT sql
30282
+ FROM sqlite_temp_master
30283
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30284
+ 
30285
+  (0.1ms) SELECT sql
30286
+ FROM sqlite_master
30287
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30288
+ UNION ALL
30289
+ SELECT sql
30290
+ FROM sqlite_temp_master
30291
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30292
+
30293
+  (0.1ms)  SELECT sql
30294
+ FROM sqlite_master
30295
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30296
+ UNION ALL
30297
+ SELECT sql
30298
+ FROM sqlite_temp_master
30299
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30300
+ 
30301
+  (0.1ms) SELECT sql
30302
+ FROM sqlite_master
30303
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30304
+ UNION ALL
30305
+ SELECT sql
30306
+ FROM sqlite_temp_master
30307
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30308
+
30309
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30310
+ Migrating to CreateOrgDepartments (20151204183447)
30311
+  (0.1ms) begin transaction
30312
+  (1.3ms) CREATE TABLE "org_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_id" integer NOT NULL, "manager_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
30313
+  (0.2ms) CREATE TABLE "org_department_texts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parent_id" integer NOT NULL, "lang_id" integer NOT NULL, "name" varchar DEFAULT '' NOT NULL, "desc" text DEFAULT '' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
30314
+  (0.1ms) select sqlite_version(*)
30315
+  (1.9ms) CREATE UNIQUE INDEX "index_org_department_texts" ON "org_department_texts" ("lang_id", "parent_id")
30316
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151204183447"]]
30317
+  (1.2ms) commit transaction
30318
+ Migrating to CreateOrgDepartmentPositions (20151204183612)
30319
+  (0.1ms) begin transaction
30320
+  (0.4ms) CREATE TABLE "org_department_positions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_department_id" integer NOT NULL, "position" integer DEFAULT 0 NOT NULL, "limit" integer DEFAULT 0 NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
30321
+  (0.2ms) CREATE TABLE "org_department_position_texts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parent_id" integer NOT NULL, "lang_id" integer NOT NULL, "name" varchar DEFAULT '' NOT NULL, "desc" text DEFAULT '' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
30322
+  (0.5ms) CREATE UNIQUE INDEX "index_org_department_position_texts" ON "org_department_position_texts" ("lang_id", "parent_id")
30323
+  (0.2ms) CREATE TABLE "org_department_position_member_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_department_position_id" integer NOT NULL, "org_manager_id" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
30324
+  (0.2ms) CREATE UNIQUE INDEX "index_org_department_position_member_mappings" ON "org_department_position_member_mappings" ("org_department_position_id", "org_manager_id")
30325
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151204183612"]]
30326
+  (1.4ms) commit transaction
30327
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30328
+  (0.1ms) SELECT sql
30329
+ FROM sqlite_master
30330
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30331
+ UNION ALL
30332
+ SELECT sql
30333
+ FROM sqlite_temp_master
30334
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30335
+
30336
+  (0.1ms)  SELECT sql
30337
+ FROM sqlite_master
30338
+ WHERE name='index_langs_on_code' AND type='index'
30339
+ UNION ALL
30340
+ SELECT sql
30341
+ FROM sqlite_temp_master
30342
+ WHERE name='index_langs_on_code' AND type='index'
30343
+ 
30344
+  (0.2ms) SELECT sql
30345
+ FROM sqlite_master
30346
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30347
+ UNION ALL
30348
+ SELECT sql
30349
+ FROM sqlite_temp_master
30350
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30351
+
30352
+  (0.1ms)  SELECT sql
30353
+ FROM sqlite_master
30354
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30355
+ UNION ALL
30356
+ SELECT sql
30357
+ FROM sqlite_temp_master
30358
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30359
+ 
30360
+  (0.1ms) SELECT sql
30361
+ FROM sqlite_master
30362
+ WHERE name='index_org_branch_texts' AND type='index'
30363
+ UNION ALL
30364
+ SELECT sql
30365
+ FROM sqlite_temp_master
30366
+ WHERE name='index_org_branch_texts' AND type='index'
30367
+
30368
+  (0.1ms)  SELECT sql
30369
+ FROM sqlite_master
30370
+ WHERE name='index_org_branch_type_texts' AND type='index'
30371
+ UNION ALL
30372
+ SELECT sql
30373
+ FROM sqlite_temp_master
30374
+ WHERE name='index_org_branch_type_texts' AND type='index'
30375
+ 
30376
+  (0.1ms) SELECT sql
30377
+ FROM sqlite_master
30378
+ WHERE name='index_org_department_position_member_mappings' AND type='index'
30379
+ UNION ALL
30380
+ SELECT sql
30381
+ FROM sqlite_temp_master
30382
+ WHERE name='index_org_department_position_member_mappings' AND type='index'
30383
+
30384
+  (0.1ms)  SELECT sql
30385
+ FROM sqlite_master
30386
+ WHERE name='index_org_department_position_texts' AND type='index'
30387
+ UNION ALL
30388
+ SELECT sql
30389
+ FROM sqlite_temp_master
30390
+ WHERE name='index_org_department_position_texts' AND type='index'
30391
+ 
30392
+  (0.1ms) SELECT sql
30393
+ FROM sqlite_master
30394
+ WHERE name='index_org_department_texts' AND type='index'
30395
+ UNION ALL
30396
+ SELECT sql
30397
+ FROM sqlite_temp_master
30398
+ WHERE name='index_org_department_texts' AND type='index'
30399
+
30400
+  (0.1ms)  SELECT sql
30401
+ FROM sqlite_master
30402
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30403
+ UNION ALL
30404
+ SELECT sql
30405
+ FROM sqlite_temp_master
30406
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30407
+ 
30408
+  (0.1ms) SELECT sql
30409
+ FROM sqlite_master
30410
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30411
+ UNION ALL
30412
+ SELECT sql
30413
+ FROM sqlite_temp_master
30414
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30415
+
30416
+  (0.1ms)  SELECT sql
30417
+ FROM sqlite_master
30418
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30419
+ UNION ALL
30420
+ SELECT sql
30421
+ FROM sqlite_temp_master
30422
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30423
+ 
30424
+  (0.1ms) SELECT sql
30425
+ FROM sqlite_master
30426
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30427
+ UNION ALL
30428
+ SELECT sql
30429
+ FROM sqlite_temp_master
30430
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30431
+
30432
+  (0.1ms)  SELECT sql
30433
+ FROM sqlite_master
30434
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30435
+ UNION ALL
30436
+ SELECT sql
30437
+ FROM sqlite_temp_master
30438
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30439
+ 
30440
+  (0.1ms) SELECT sql
30441
+ FROM sqlite_master
30442
+ WHERE name='index_org_texts' AND type='index'
30443
+ UNION ALL
30444
+ SELECT sql
30445
+ FROM sqlite_temp_master
30446
+ WHERE name='index_org_texts' AND type='index'
30447
+
30448
+  (0.1ms)  SELECT sql
30449
+ FROM sqlite_master
30450
+ WHERE name='idx_person_name_texts' AND type='index'
30451
+ UNION ALL
30452
+ SELECT sql
30453
+ FROM sqlite_temp_master
30454
+ WHERE name='idx_person_name_texts' AND type='index'
30455
+ 
30456
+  (0.1ms) SELECT sql
30457
+ FROM sqlite_master
30458
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30459
+ UNION ALL
30460
+ SELECT sql
30461
+ FROM sqlite_temp_master
30462
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30463
+
30464
+  (0.1ms)  SELECT sql
30465
+ FROM sqlite_master
30466
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30467
+ UNION ALL
30468
+ SELECT sql
30469
+ FROM sqlite_temp_master
30470
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30471
+ 
30472
+  (0.1ms) SELECT sql
30473
+ FROM sqlite_master
30474
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30475
+ UNION ALL
30476
+ SELECT sql
30477
+ FROM sqlite_temp_master
30478
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30479
+
30480
+  (0.1ms)  SELECT sql
30481
+ FROM sqlite_master
30482
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30483
+ UNION ALL
30484
+ SELECT sql
30485
+ FROM sqlite_temp_master
30486
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30487
+ 
30488
+ OrgMember Load (0.5ms) SELECT "org_members".* FROM "org_members" WHERE "org_members"."id" = ? LIMIT 1 [["id", 1]]
30489
+ OrgDepartmentPositionMemberMapping Load (0.8ms) SELECT "org_department_position_member_mappings".* FROM "org_department_position_member_mappings"
30490
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30491
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30492
+ Migrating to CreateOrgDepartmentPositions (20151204183612)
30493
+  (0.1ms) begin transaction
30494
+  (0.2ms) SELECT sql
30495
+ FROM sqlite_master
30496
+ WHERE name='index_org_department_position_member_mappings' AND type='index'
30497
+ UNION ALL
30498
+ SELECT sql
30499
+ FROM sqlite_temp_master
30500
+ WHERE name='index_org_department_position_member_mappings' AND type='index'
30501
+
30502
+  (1.1ms) DROP INDEX "index_org_department_position_member_mappings"
30503
+  (1.5ms) DROP TABLE "org_department_position_member_mappings"
30504
+  (0.1ms)  SELECT sql
30505
+ FROM sqlite_master
30506
+ WHERE name='index_org_department_position_texts' AND type='index'
30507
+ UNION ALL
30508
+ SELECT sql
30509
+ FROM sqlite_temp_master
30510
+ WHERE name='index_org_department_position_texts' AND type='index'
30511
+ 
30512
+  (0.2ms) DROP INDEX "index_org_department_position_texts"
30513
+  (0.2ms) DROP TABLE "org_department_position_texts"
30514
+  (0.2ms) DROP TABLE "org_department_positions"
30515
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20151204183612"]]
30516
+  (1.4ms) commit transaction
30517
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30518
+  (0.1ms) SELECT sql
30519
+ FROM sqlite_master
30520
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30521
+ UNION ALL
30522
+ SELECT sql
30523
+ FROM sqlite_temp_master
30524
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30525
+
30526
+  (0.1ms)  SELECT sql
30527
+ FROM sqlite_master
30528
+ WHERE name='index_langs_on_code' AND type='index'
30529
+ UNION ALL
30530
+ SELECT sql
30531
+ FROM sqlite_temp_master
30532
+ WHERE name='index_langs_on_code' AND type='index'
30533
+ 
30534
+  (0.1ms) SELECT sql
30535
+ FROM sqlite_master
30536
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30537
+ UNION ALL
30538
+ SELECT sql
30539
+ FROM sqlite_temp_master
30540
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30541
+
30542
+  (0.2ms)  SELECT sql
30543
+ FROM sqlite_master
30544
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30545
+ UNION ALL
30546
+ SELECT sql
30547
+ FROM sqlite_temp_master
30548
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30549
+ 
30550
+  (0.1ms) SELECT sql
30551
+ FROM sqlite_master
30552
+ WHERE name='index_org_branch_texts' AND type='index'
30553
+ UNION ALL
30554
+ SELECT sql
30555
+ FROM sqlite_temp_master
30556
+ WHERE name='index_org_branch_texts' AND type='index'
30557
+
30558
+  (0.1ms)  SELECT sql
30559
+ FROM sqlite_master
30560
+ WHERE name='index_org_branch_type_texts' AND type='index'
30561
+ UNION ALL
30562
+ SELECT sql
30563
+ FROM sqlite_temp_master
30564
+ WHERE name='index_org_branch_type_texts' AND type='index'
30565
+ 
30566
+  (0.1ms) SELECT sql
30567
+ FROM sqlite_master
30568
+ WHERE name='index_org_department_texts' AND type='index'
30569
+ UNION ALL
30570
+ SELECT sql
30571
+ FROM sqlite_temp_master
30572
+ WHERE name='index_org_department_texts' AND type='index'
30573
+
30574
+  (0.1ms)  SELECT sql
30575
+ FROM sqlite_master
30576
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30577
+ UNION ALL
30578
+ SELECT sql
30579
+ FROM sqlite_temp_master
30580
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30581
+ 
30582
+  (0.1ms) SELECT sql
30583
+ FROM sqlite_master
30584
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30585
+ UNION ALL
30586
+ SELECT sql
30587
+ FROM sqlite_temp_master
30588
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30589
+
30590
+  (0.1ms)  SELECT sql
30591
+ FROM sqlite_master
30592
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30593
+ UNION ALL
30594
+ SELECT sql
30595
+ FROM sqlite_temp_master
30596
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30597
+ 
30598
+  (0.1ms) SELECT sql
30599
+ FROM sqlite_master
30600
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30601
+ UNION ALL
30602
+ SELECT sql
30603
+ FROM sqlite_temp_master
30604
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30605
+
30606
+  (0.1ms)  SELECT sql
30607
+ FROM sqlite_master
30608
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30609
+ UNION ALL
30610
+ SELECT sql
30611
+ FROM sqlite_temp_master
30612
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30613
+ 
30614
+  (0.1ms) SELECT sql
30615
+ FROM sqlite_master
30616
+ WHERE name='index_org_texts' AND type='index'
30617
+ UNION ALL
30618
+ SELECT sql
30619
+ FROM sqlite_temp_master
30620
+ WHERE name='index_org_texts' AND type='index'
30621
+
30622
+  (0.1ms)  SELECT sql
30623
+ FROM sqlite_master
30624
+ WHERE name='idx_person_name_texts' AND type='index'
30625
+ UNION ALL
30626
+ SELECT sql
30627
+ FROM sqlite_temp_master
30628
+ WHERE name='idx_person_name_texts' AND type='index'
30629
+ 
30630
+  (0.1ms) SELECT sql
30631
+ FROM sqlite_master
30632
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30633
+ UNION ALL
30634
+ SELECT sql
30635
+ FROM sqlite_temp_master
30636
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30637
+
30638
+  (0.1ms)  SELECT sql
30639
+ FROM sqlite_master
30640
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30641
+ UNION ALL
30642
+ SELECT sql
30643
+ FROM sqlite_temp_master
30644
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30645
+ 
30646
+  (0.1ms) SELECT sql
30647
+ FROM sqlite_master
30648
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30649
+ UNION ALL
30650
+ SELECT sql
30651
+ FROM sqlite_temp_master
30652
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30653
+
30654
+  (0.1ms)  SELECT sql
30655
+ FROM sqlite_master
30656
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30657
+ UNION ALL
30658
+ SELECT sql
30659
+ FROM sqlite_temp_master
30660
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30661
+ 
30662
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
30663
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30664
+ Migrating to CreateOrgDepartments (20151204183447)
30665
+  (0.1ms) begin transaction
30666
+  (0.1ms) SELECT sql
30667
+ FROM sqlite_master
30668
+ WHERE name='index_org_department_texts' AND type='index'
30669
+ UNION ALL
30670
+ SELECT sql
30671
+ FROM sqlite_temp_master
30672
+ WHERE name='index_org_department_texts' AND type='index'
30673
+
30674
+  (0.9ms) DROP INDEX "index_org_department_texts"
30675
+  (1.3ms) DROP TABLE "org_department_texts"
30676
+  (0.2ms) DROP TABLE "org_departments"
30677
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20151204183447"]]
30678
+  (1.1ms) commit transaction
30679
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30680
+  (0.1ms)  SELECT sql
30681
+ FROM sqlite_master
30682
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30683
+ UNION ALL
30684
+ SELECT sql
30685
+ FROM sqlite_temp_master
30686
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30687
+ 
30688
+  (0.1ms) SELECT sql
30689
+ FROM sqlite_master
30690
+ WHERE name='index_langs_on_code' AND type='index'
30691
+ UNION ALL
30692
+ SELECT sql
30693
+ FROM sqlite_temp_master
30694
+ WHERE name='index_langs_on_code' AND type='index'
30695
+
30696
+  (0.1ms)  SELECT sql
30697
+ FROM sqlite_master
30698
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30699
+ UNION ALL
30700
+ SELECT sql
30701
+ FROM sqlite_temp_master
30702
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30703
+ 
30704
+  (0.1ms) SELECT sql
30705
+ FROM sqlite_master
30706
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30707
+ UNION ALL
30708
+ SELECT sql
30709
+ FROM sqlite_temp_master
30710
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30711
+
30712
+  (0.1ms)  SELECT sql
30713
+ FROM sqlite_master
30714
+ WHERE name='index_org_branch_texts' AND type='index'
30715
+ UNION ALL
30716
+ SELECT sql
30717
+ FROM sqlite_temp_master
30718
+ WHERE name='index_org_branch_texts' AND type='index'
30719
+ 
30720
+  (0.1ms) SELECT sql
30721
+ FROM sqlite_master
30722
+ WHERE name='index_org_branch_type_texts' AND type='index'
30723
+ UNION ALL
30724
+ SELECT sql
30725
+ FROM sqlite_temp_master
30726
+ WHERE name='index_org_branch_type_texts' AND type='index'
30727
+
30728
+  (0.1ms)  SELECT sql
30729
+ FROM sqlite_master
30730
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30731
+ UNION ALL
30732
+ SELECT sql
30733
+ FROM sqlite_temp_master
30734
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30735
+ 
30736
+  (0.1ms) SELECT sql
30737
+ FROM sqlite_master
30738
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30739
+ UNION ALL
30740
+ SELECT sql
30741
+ FROM sqlite_temp_master
30742
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30743
+
30744
+  (0.1ms)  SELECT sql
30745
+ FROM sqlite_master
30746
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30747
+ UNION ALL
30748
+ SELECT sql
30749
+ FROM sqlite_temp_master
30750
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30751
+ 
30752
+  (0.1ms) SELECT sql
30753
+ FROM sqlite_master
30754
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30755
+ UNION ALL
30756
+ SELECT sql
30757
+ FROM sqlite_temp_master
30758
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30759
+
30760
+  (0.1ms)  SELECT sql
30761
+ FROM sqlite_master
30762
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30763
+ UNION ALL
30764
+ SELECT sql
30765
+ FROM sqlite_temp_master
30766
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30767
+ 
30768
+  (0.1ms) SELECT sql
30769
+ FROM sqlite_master
30770
+ WHERE name='index_org_texts' AND type='index'
30771
+ UNION ALL
30772
+ SELECT sql
30773
+ FROM sqlite_temp_master
30774
+ WHERE name='index_org_texts' AND type='index'
30775
+
30776
+  (0.1ms)  SELECT sql
30777
+ FROM sqlite_master
30778
+ WHERE name='idx_person_name_texts' AND type='index'
30779
+ UNION ALL
30780
+ SELECT sql
30781
+ FROM sqlite_temp_master
30782
+ WHERE name='idx_person_name_texts' AND type='index'
30783
+ 
30784
+  (0.1ms) SELECT sql
30785
+ FROM sqlite_master
30786
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30787
+ UNION ALL
30788
+ SELECT sql
30789
+ FROM sqlite_temp_master
30790
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30791
+
30792
+  (0.2ms)  SELECT sql
30793
+ FROM sqlite_master
30794
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30795
+ UNION ALL
30796
+ SELECT sql
30797
+ FROM sqlite_temp_master
30798
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30799
+ 
30800
+  (0.3ms) SELECT sql
30801
+ FROM sqlite_master
30802
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30803
+ UNION ALL
30804
+ SELECT sql
30805
+ FROM sqlite_temp_master
30806
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30807
+
30808
+  (0.1ms)  SELECT sql
30809
+ FROM sqlite_master
30810
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30811
+ UNION ALL
30812
+ SELECT sql
30813
+ FROM sqlite_temp_master
30814
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30815
+ 
30816
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30817
+ Migrating to CreateOrgDepartments (20151204183447)
30818
+  (0.1ms) begin transaction
30819
+  (0.6ms) CREATE TABLE "org_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_id" integer NOT NULL, "manager_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
30820
+  (0.2ms) CREATE TABLE "org_department_texts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parent_id" integer NOT NULL, "lang_id" integer NOT NULL, "name" varchar DEFAULT '' NOT NULL, "desc" text DEFAULT '' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
30821
+  (0.1ms) select sqlite_version(*)
30822
+  (1.1ms) CREATE UNIQUE INDEX "index_org_department_texts" ON "org_department_texts" ("lang_id", "parent_id")
30823
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151204183447"]]
30824
+  (1.0ms) commit transaction
30825
+ Migrating to CreateOrgDepartmentPositions (20151204183612)
30826
+  (0.1ms) begin transaction
30827
+  (0.5ms) CREATE TABLE "org_department_positions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_department_id" integer NOT NULL, "position" integer DEFAULT 0 NOT NULL, "limit" integer DEFAULT 0 NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
30828
+  (0.2ms) CREATE TABLE "org_department_position_texts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parent_id" integer NOT NULL, "lang_id" integer NOT NULL, "name" varchar DEFAULT '' NOT NULL, "desc" text DEFAULT '' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
30829
+  (0.5ms) CREATE UNIQUE INDEX "index_org_department_position_texts" ON "org_department_position_texts" ("lang_id", "parent_id")
30830
+  (0.1ms) CREATE TABLE "org_department_position_member_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "org_department_position_id" integer NOT NULL, "org_member_id" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
30831
+  (0.1ms) CREATE UNIQUE INDEX "index_org_department_position_member_mappings" ON "org_department_position_member_mappings" ("org_department_position_id", "org_member_id")
30832
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151204183612"]]
30833
+  (1.0ms) commit transaction
30834
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30835
+  (0.2ms) SELECT sql
30836
+ FROM sqlite_master
30837
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30838
+ UNION ALL
30839
+ SELECT sql
30840
+ FROM sqlite_temp_master
30841
+ WHERE name='index_lang_texts_on_parent_id_and_lang_id' AND type='index'
30842
+
30843
+  (0.1ms)  SELECT sql
30844
+ FROM sqlite_master
30845
+ WHERE name='index_langs_on_code' AND type='index'
30846
+ UNION ALL
30847
+ SELECT sql
30848
+ FROM sqlite_temp_master
30849
+ WHERE name='index_langs_on_code' AND type='index'
30850
+ 
30851
+  (0.1ms) SELECT sql
30852
+ FROM sqlite_master
30853
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30854
+ UNION ALL
30855
+ SELECT sql
30856
+ FROM sqlite_temp_master
30857
+ WHERE name='index_org_activity_texts_on_lang_id_and_parent_id' AND type='index'
30858
+
30859
+  (0.1ms)  SELECT sql
30860
+ FROM sqlite_master
30861
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30862
+ UNION ALL
30863
+ SELECT sql
30864
+ FROM sqlite_temp_master
30865
+ WHERE name='index_org_branch_member_mappings' AND type='index'
30866
+ 
30867
+  (0.1ms) SELECT sql
30868
+ FROM sqlite_master
30869
+ WHERE name='index_org_branch_texts' AND type='index'
30870
+ UNION ALL
30871
+ SELECT sql
30872
+ FROM sqlite_temp_master
30873
+ WHERE name='index_org_branch_texts' AND type='index'
30874
+
30875
+  (0.1ms)  SELECT sql
30876
+ FROM sqlite_master
30877
+ WHERE name='index_org_branch_type_texts' AND type='index'
30878
+ UNION ALL
30879
+ SELECT sql
30880
+ FROM sqlite_temp_master
30881
+ WHERE name='index_org_branch_type_texts' AND type='index'
30882
+ 
30883
+  (0.1ms) SELECT sql
30884
+ FROM sqlite_master
30885
+ WHERE name='index_org_department_position_member_mappings' AND type='index'
30886
+ UNION ALL
30887
+ SELECT sql
30888
+ FROM sqlite_temp_master
30889
+ WHERE name='index_org_department_position_member_mappings' AND type='index'
30890
+
30891
+  (0.1ms)  SELECT sql
30892
+ FROM sqlite_master
30893
+ WHERE name='index_org_department_position_texts' AND type='index'
30894
+ UNION ALL
30895
+ SELECT sql
30896
+ FROM sqlite_temp_master
30897
+ WHERE name='index_org_department_position_texts' AND type='index'
30898
+ 
30899
+  (0.1ms) SELECT sql
30900
+ FROM sqlite_master
30901
+ WHERE name='index_org_department_texts' AND type='index'
30902
+ UNION ALL
30903
+ SELECT sql
30904
+ FROM sqlite_temp_master
30905
+ WHERE name='index_org_department_texts' AND type='index'
30906
+
30907
+  (0.1ms)  SELECT sql
30908
+ FROM sqlite_master
30909
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30910
+ UNION ALL
30911
+ SELECT sql
30912
+ FROM sqlite_temp_master
30913
+ WHERE name='index_org_director_type_texts_on_parent_id_and_lang_id' AND type='index'
30914
+ 
30915
+  (0.1ms) SELECT sql
30916
+ FROM sqlite_master
30917
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30918
+ UNION ALL
30919
+ SELECT sql
30920
+ FROM sqlite_temp_master
30921
+ WHERE name='index_org_member_tag_mappings' AND type='index'
30922
+
30923
+  (0.1ms)  SELECT sql
30924
+ FROM sqlite_master
30925
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30926
+ UNION ALL
30927
+ SELECT sql
30928
+ FROM sqlite_temp_master
30929
+ WHERE name='index_org_member_tag_texts_on_lang_id_and_parent_id' AND type='index'
30930
+ 
30931
+  (0.1ms) SELECT sql
30932
+ FROM sqlite_master
30933
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30934
+ UNION ALL
30935
+ SELECT sql
30936
+ FROM sqlite_temp_master
30937
+ WHERE name='index_org_member_texts_on_lang_id_and_parent_id' AND type='index'
30938
+
30939
+  (0.1ms)  SELECT sql
30940
+ FROM sqlite_master
30941
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30942
+ UNION ALL
30943
+ SELECT sql
30944
+ FROM sqlite_temp_master
30945
+ WHERE name='index_org_member_type_texts_on_lang_id_and_parent_id' AND type='index'
30946
+ 
30947
+  (0.1ms) SELECT sql
30948
+ FROM sqlite_master
30949
+ WHERE name='index_org_texts' AND type='index'
30950
+ UNION ALL
30951
+ SELECT sql
30952
+ FROM sqlite_temp_master
30953
+ WHERE name='index_org_texts' AND type='index'
30954
+
30955
+  (0.1ms)  SELECT sql
30956
+ FROM sqlite_master
30957
+ WHERE name='idx_person_name_texts' AND type='index'
30958
+ UNION ALL
30959
+ SELECT sql
30960
+ FROM sqlite_temp_master
30961
+ WHERE name='idx_person_name_texts' AND type='index'
30962
+ 
30963
+  (0.1ms) SELECT sql
30964
+ FROM sqlite_master
30965
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30966
+ UNION ALL
30967
+ SELECT sql
30968
+ FROM sqlite_temp_master
30969
+ WHERE name='index_person_names_on_person_id_and_revision' AND type='index'
30970
+
30971
+  (0.1ms)  SELECT sql
30972
+ FROM sqlite_master
30973
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30974
+ UNION ALL
30975
+ SELECT sql
30976
+ FROM sqlite_temp_master
30977
+ WHERE name='index_person_texts_on_parent_id_and_lang_id' AND type='index'
30978
+ 
30979
+  (0.1ms) SELECT sql
30980
+ FROM sqlite_master
30981
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30982
+ UNION ALL
30983
+ SELECT sql
30984
+ FROM sqlite_temp_master
30985
+ WHERE name='index_user_accounts_on_uid' AND type='index'
30986
+
30987
+  (0.1ms)  SELECT sql
30988
+ FROM sqlite_master
30989
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30990
+ UNION ALL
30991
+ SELECT sql
30992
+ FROM sqlite_temp_master
30993
+ WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
30994
+ 
30995
+ OrgDepartment Load (0.2ms) SELECT "org_departments".* FROM "org_departments" ORDER BY "org_departments"."id" ASC LIMIT 1