Remove superfluous test sql

[ci skip]
pull/8225/head
Oliver Günther 5 years ago
parent 457f23da8b
commit 308f901853
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 10
      spec/models/query/blubs.sql

@ -1,10 +0,0 @@
SELECT COUNT(DISTINCT "work_packages"."id") AS count_id, "work_packages"."responsible_id" AS work_packages_responsible_id FROM "work_packages" LEFT OUTER JOIN "statuses" ON "statuses"."id" = "work_packages"."status_id" LEFT OUTER JOIN "projects" ON "projects"."id" = "work_packages"."project_id" LEFT OUTER JOIN "users" ON "users"."id" = "work_packages"."responsible_id" LEFT OUTER JOIN "users" "assigned_tos_work_packages" ON "assigned_tos_work_packages"."id" = "work_packages"."assigned_to_id" LEFT OUTER JOIN "types" ON "types"."id" = "work_packages"."type_id" LEFT OUTER JOIN "enumerations" ON "enumerations"."id" = "work_packages"."priority_id" AND "enumerations"."type" = $1 LEFT OUTER JOIN "categories" ON "categories"."id" = "work_packages"."category_id" LEFT OUTER JOIN "versions" ON "versions"."id" = "work_packages"."version_id" WHERE "work_packages"."project_id" IN (SELECT DISTINCT "projects"."id" FROM "projects" LEFT OUTER JOIN "members" ON "projects"."id" = "members"."project_id" AND "members"."user_id" = 1 AND "projects"."status" = 1 INNER JOIN "enabled_modules" ON "projects"."id" = "enabled_modules"."project_id" AND "enabled_modules"."name" IN ('work_package_tracking') AND "projects"."status" = 1 INNER JOIN "role_permissions" ON "role_permissions"."permission" IN ('view_work_packages') INNER JOIN "roles" "permission_roles" ON "permission_roles"."id" = "role_permissions"."role_id" LEFT OUTER JOIN "member_roles" ON "members"."id" = "member_roles"."member_id" LEFT OUTER JOIN "roles" "assigned_roles" ON "assigned_roles"."id" = "permission_roles"."id" AND "projects"."status" = 1 AND ("assigned_roles"."id" = "member_roles"."role_id" OR "projects"."is_public" = TRUE AND "assigned_roles"."builtin" = 1 AND "member_roles"."id" IS NULL) WHERE "assigned_roles"."id" IS NOT NULL) AND ((projects.id IN (1,1,2)) AND (statuses.is_closed=FALSE)) GROUP BY "work_packages"."responsible_id" [["type", "IssuePriority"]]
SELECT COUNT(DISTINCT "work_packages"."id") AS count_id, "work_packages"."responsible_id" AS work_packages_responsible_id FROM "work_packages" LEFT OUTER JOIN "statuses" ON "statuses"."id" = "work_packages"."status_id" LEFT OUTER JOIN "projects" ON "projects"."id" = "work_packages"."project_id" LEFT OUTER JOIN "users" ON "users"."id" = "work_packages"."responsible_id" LEFT OUTER JOIN "users" "assigned_tos_work_packages" ON "assigned_tos_work_packages"."id" = "work_packages"."assigned_to_id" LEFT OUTER JOIN "types" ON "types"."id" = "work_packages"."type_id" LEFT OUTER JOIN "enumerations" ON "enumerations"."id" = "work_packages"."priority_id" AND "enumerations"."type" IN ('IssuePriority') LEFT OUTER JOIN "categories" ON "categories"."id" = "work_packages"."category_id" LEFT OUTER JOIN "versions" ON "versions"."id" = "work_packages"."version_id" WHERE "work_packages"."project_id" IN (SELECT DISTINCT "projects"."id" FROM "projects" LEFT OUTER JOIN "members" ON "projects"."id" = "members"."project_id" AND "members"."user_id" = 1 AND "projects"."status" = 1 INNER JOIN "enabled_modules" ON "projects"."id" = "enabled_modules"."project_id" AND "enabled_modules"."name" IN ('work_package_tracking') AND "projects"."status" = 1 INNER JOIN "role_permissions" ON "role_permissions"."permission" IN ('view_work_packages') INNER JOIN "roles" "permission_roles" ON "permission_roles"."id" = "role_permissions"."role_id" LEFT OUTER JOIN "member_roles" ON "members"."id" = "member_roles"."member_id" LEFT OUTER JOIN "roles" "assigned_roles" ON "assigned_roles"."id" = "permission_roles"."id" AND "projects"."status" = 1 AND ("assigned_roles"."id" = "member_roles"."role_id" OR "projects"."is_public" = TRUE AND "assigned_roles"."builtin" = 1 AND "member_roles"."id" IS NULL) WHERE "assigned_roles"."id" IS NOT NULL) AND ((projects.id IN (1)) AND (statuses.is_closed=FALSE)) GROUP BY "work_packages"."responsible_id"
SELECT DISTINCT "projects".* FROM "projects" LEFT OUTER JOIN "members" ON "projects"."id" = "members"."project_id" AND "members"."user_id" = 1 AND "projects"."status" = 1 LEFT OUTER JOIN "member_roles" ON "members"."id" = "member_roles"."member_id" LEFT OUTER JOIN "roles" "assigned_roles" ON 1 = 1 AND "projects"."status" = 1 AND ("assigned_roles"."id" = "member_roles"."role_id" OR "projects"."is_public" = TRUE AND "assigned_roles"."builtin" = 1 AND "member_roles"."id" IS NULL) WHERE "assigned_roles"."id" IS NOT NULL
SELECT DISTINCT "projects".* FROM "projects" LEFT OUTER JOIN "members" ON "projects"."id" = "members"."project_id" AND "members"."user_id" = 1 AND "projects"."status" = 1 LEFT OUTER JOIN "member_roles" ON "members"."id" = "member_roles"."member_id" LEFT OUTER JOIN "roles" "assigned_roles" ON 1 = 1 AND "projects"."status" = 1 AND ("assigned_roles"."id" = "member_roles"."role_id" OR "projects"."is_public" = TRUE AND "assigned_roles"."builtin" = 1 AND "member_roles"."id" IS NULL) WHERE "projects"."lft" >= 1 AND "projects"."lft" < 2 AND ("projects"."id" != 1) AND "assigned_roles"."id" IS NOT NULL ORDER BY "projects"."name" ASC
Loading…
Cancel
Save