You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SqTables.java 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2021 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. package org.sonar.db.version;
  21. import java.util.HashSet;
  22. import java.util.Set;
  23. import static java.util.Arrays.asList;
  24. import static java.util.Collections.unmodifiableSet;
  25. public final class SqTables {
  26. /**
  27. * List of all the tables.
  28. * This list is hardcoded because we didn't succeed in using java.sql.DatabaseMetaData#getTables() in the same way
  29. * for all the supported databases, particularly due to Oracle results.
  30. */
  31. public static final Set<String> TABLES = unmodifiableSet(new HashSet<>(asList(
  32. "active_rules",
  33. "active_rule_parameters",
  34. "alm_settings",
  35. "alm_pats",
  36. "analysis_properties",
  37. "app_branch_project_branch",
  38. "app_projects",
  39. "audits",
  40. "ce_activity",
  41. "ce_queue",
  42. "ce_task_characteristics",
  43. "ce_task_input",
  44. "ce_task_message",
  45. "ce_scanner_context",
  46. "components",
  47. "default_qprofiles",
  48. "deprecated_rule_keys",
  49. "duplications_index",
  50. "es_queue",
  51. "events",
  52. "event_component_changes",
  53. "file_sources",
  54. "groups",
  55. "groups_users",
  56. "group_roles",
  57. "internal_component_props",
  58. "internal_properties",
  59. "issues",
  60. "issue_changes",
  61. "live_measures",
  62. "metrics",
  63. "new_code_periods",
  64. "notifications",
  65. "org_qprofiles",
  66. "permission_templates",
  67. "perm_templates_users",
  68. "perm_templates_groups",
  69. "perm_tpl_characteristics",
  70. "plugins",
  71. "portfolios",
  72. "portfolio_projects",
  73. "portfolio_proj_branches",
  74. "portfolio_references",
  75. "projects",
  76. "project_alm_settings",
  77. "project_badge_token",
  78. "project_branches",
  79. "project_links",
  80. "project_mappings",
  81. "project_measures",
  82. "project_qprofiles",
  83. "properties",
  84. "qprofile_changes",
  85. "qprofile_edit_groups",
  86. "qprofile_edit_users",
  87. "quality_gates",
  88. "qgate_user_permissions",
  89. "qgate_group_permissions",
  90. "quality_gate_conditions",
  91. "saml_message_ids",
  92. "rules",
  93. "rules_metadata",
  94. "rules_parameters",
  95. "rules_profiles",
  96. "rule_repositories",
  97. "schema_migrations",
  98. "session_tokens",
  99. "snapshots",
  100. "users",
  101. "user_dismissed_messages",
  102. "user_properties",
  103. "user_roles",
  104. "user_tokens",
  105. "webhooks",
  106. "webhook_deliveries")));
  107. private SqTables() {
  108. // prevents instantiation
  109. }
  110. }