diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.edn
index cb2d937a3694fd65fea7c260f452fda91bf283e0..112528bddb5f1cbf2287022d7745b2e384d648e5 100644
--- a/.clj-kondo/config.edn
+++ b/.clj-kondo/config.edn
@@ -134,8 +134,9 @@
    honeysql.core/call            {:message "Use hx/call instead because it is Honey SQL 2 friendly"}
    honeysql.core/raw             {:message "Use hx/raw instead because it is Honey SQL 2 friendly"}
    java-time/with-clock          {:message "Use mt/with-clock"}
-   toucan.db/select-one          {:message "Use toucan.db/select-one instead of toucan2.core/select-one"}
-   toucan.db/select-one-id       {:message "Use toucan.db/select-one-id instead of toucan2.core/select-one-pk"}
+   toucan.db/select              {:message "Use t2/select instead of toucan.db/select"}
+   toucan.db/select-one          {:message "Use t2/select-one instead of toucan.db/select-one"}
+   toucan.db/select-one-id       {:message "Use t2/select-one-pk instead of toucan.db/select-one-id"}
    toucan.db/select-one-field    {:message "Use t2/select-one-fn instead of toucan.db/select-one-field"}
    toucan.db/select-ids          {:message "Use t2/select-pks-set instead of toucan.db/select-ids"}
    toucan.db/select-field        {:message "Use t2/select-fn instead of toucan.db/select-field"}
diff --git a/dev/src/dev/debug_qp.clj b/dev/src/dev/debug_qp.clj
index aa8c842e00ba5e83f34d4cb29673ee8003109b73..f9067a080e6e66b673493bfb6491c4481f60a00c 100644
--- a/dev/src/dev/debug_qp.clj
+++ b/dev/src/dev/debug_qp.clj
@@ -99,7 +99,7 @@
 ;;;; [[add-names]]
 
 (defn- field-and-table-name [field-id]
-  (let [{field-name :name, table-id :table_id} (db/select-one [Field :name :table_id] :id field-id)]
+  (let [{field-name :name, table-id :table_id} (t2/select-one [Field :name :table_id] :id field-id)]
     [(t2/select-one-fn :name Table :id table-id) field-name]))
 
 (defn- add-table-id-name [table-id]
diff --git a/enterprise/backend/src/metabase_enterprise/advanced_permissions/models/permissions/application_permissions.clj b/enterprise/backend/src/metabase_enterprise/advanced_permissions/models/permissions/application_permissions.clj
index edbfc7c990e982b9a0130d062bd4a087f8c47857..91028b5a5a923169cbc186ac06a893e4a7e3b403 100644
--- a/enterprise/backend/src/metabase_enterprise/advanced_permissions/models/permissions/application_permissions.clj
+++ b/enterprise/backend/src/metabase_enterprise/advanced_permissions/models/permissions/application_permissions.clj
@@ -9,7 +9,8 @@
    [metabase.util.honey-sql-2 :as h2x]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]))
+   [toucan.db :as db]
+   [toucan2.core :as t2]))
 
 ;;; ---------------------------------------------------- Schemas -----------------------------------------------------
 
@@ -26,7 +27,7 @@
   "Returns a map of group-id -> application permissions paths.
   Only groups that has at least one application permission enabled will be included."
   []
-  (let [application-permissions (db/select Permissions
+  (let [application-permissions (t2/select Permissions
                                            {:where [:or
                                                     [:= :object "/"]
                                                     [:like :object (h2x/literal "/application/%")]]})]
diff --git a/enterprise/backend/src/metabase_enterprise/advanced_permissions/models/permissions/group_manager.clj b/enterprise/backend/src/metabase_enterprise/advanced_permissions/models/permissions/group_manager.clj
index c9b2ca0de0c6cfcbb3183e2eb9fa45fdbe19707d..3190a1f234fe805a192fa9b9a7e8a2f54f652594 100644
--- a/enterprise/backend/src/metabase_enterprise/advanced_permissions/models/permissions/group_manager.clj
+++ b/enterprise/backend/src/metabase_enterprise/advanced_permissions/models/permissions/group_manager.clj
@@ -14,7 +14,7 @@
   Group Membership is a map with 2 keys [:id :is_group_manager]."
   [user-or-id]
   (when user-or-id
-    (db/select [PermissionsGroupMembership [:group_id :id] :is_group_manager] :user_id (u/the-id user-or-id))))
+    (t2/select [PermissionsGroupMembership [:group_id :id] :is_group_manager] :user_id (u/the-id user-or-id))))
 
 (defn- user-group-memberships->map
   "Transform user-group-memberships to a map in which keys are group-ids and values are maps containing membership info.
diff --git a/enterprise/backend/src/metabase_enterprise/sandbox/api/gtap.clj b/enterprise/backend/src/metabase_enterprise/sandbox/api/gtap.clj
index fd681d747ccce6abac81b28cdd75da48303f62e7..318501eb74d24b070ac7abd00897117f55d42674 100644
--- a/enterprise/backend/src/metabase_enterprise/sandbox/api/gtap.clj
+++ b/enterprise/backend/src/metabase_enterprise/sandbox/api/gtap.clj
@@ -20,7 +20,7 @@
    table_id [:maybe ms/PositiveInt]}
   (if (and group_id table_id)
     (t2/select-one GroupTableAccessPolicy :group_id group_id :table_id table_id)
-    (db/select GroupTableAccessPolicy {:order-by [[:id :asc]]})))
+    (t2/select GroupTableAccessPolicy {:order-by [[:id :asc]]})))
 
 (api/defendpoint GET "/:id"
   "Fetch GTAP by `id`"
diff --git a/enterprise/backend/src/metabase_enterprise/sandbox/api/util.clj b/enterprise/backend/src/metabase_enterprise/sandbox/api/util.clj
index 4ce8b08d405a3ef78b17a8d61bc3659e97414f3f..ad78fa1de95581ff1f3f6eaf6abf6f23192de98d 100644
--- a/enterprise/backend/src/metabase_enterprise/sandbox/api/util.clj
+++ b/enterprise/backend/src/metabase_enterprise/sandbox/api/util.clj
@@ -9,7 +9,6 @@
    [metabase.models.permissions-group-membership
     :refer [PermissionsGroupMembership]]
    [metabase.util.i18n :refer [tru]]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (defn- enforce-sandbox?
@@ -29,7 +28,7 @@
   different permissions group that grants full access to the table."
   [sandboxes group-ids]
   (let [perms               (when (seq group-ids)
-                             (db/select Permissions {:where [:in :group_id group-ids]}))
+                             (t2/select Permissions {:where [:in :group_id group-ids]}))
         group-id->perms-set (-> (group-by :group_id perms)
                                 (update-vals (fn [perms] (into #{} (map :object) perms))))]
     (filter (partial enforce-sandbox? group-id->perms-set)
@@ -44,7 +43,7 @@
      (if *current-user-id*
        (let [group-ids          (t2/select-fn-set :group_id PermissionsGroupMembership :user_id *current-user-id*)
              sandboxes          (when (seq group-ids)
-                                  (db/select GroupTableAccessPolicy :group_id [:in group-ids]))]
+                                  (t2/select GroupTableAccessPolicy :group_id [:in group-ids]))]
          (seq (enforced-sandboxes sandboxes group-ids)))
        ;; If no *current-user-id* is bound we can't check for sandboxes, so we should throw in this case to avoid
        ;; returning `false` for users who should actually be sandboxes.
diff --git a/enterprise/backend/src/metabase_enterprise/sandbox/models/group_table_access_policy.clj b/enterprise/backend/src/metabase_enterprise/sandbox/models/group_table_access_policy.clj
index 66059a4d8917b4ce043113f76b03032b8422d245..44e19989e4e40fd86f53dbfae8cccd9d825bd746 100644
--- a/enterprise/backend/src/metabase_enterprise/sandbox/models/group_table_access_policy.clj
+++ b/enterprise/backend/src/metabase_enterprise/sandbox/models/group_table_access_policy.clj
@@ -111,7 +111,7 @@
   on GTAPs (the Card cannot add fields or change types vs. the original Table)."
   [{new-result-metadata :result_metadata, card-id :id}]
   (when new-result-metadata
-    (when-let [gtaps-using-this-card (not-empty (db/select [GroupTableAccessPolicy :id :table_id] :card_id card-id))]
+    (when-let [gtaps-using-this-card (not-empty (t2/select [GroupTableAccessPolicy :id :table_id] :card_id card-id))]
       (let [original-result-metadata (t2/select-one-fn :result_metadata Card :id card-id)]
         (when-not (= original-result-metadata new-result-metadata)
           (doseq [{table-id :table_id} gtaps-using-this-card]
diff --git a/enterprise/backend/src/metabase_enterprise/sandbox/models/params/field_values.clj b/enterprise/backend/src/metabase_enterprise/sandbox/models/params/field_values.clj
index 6b3229916dee45bab7ea0c70f89fb8cf90bc6cdb..c04d8734fa882b2807193c05a55f51db7e15b33e 100644
--- a/enterprise/backend/src/metabase_enterprise/sandbox/models/params/field_values.clj
+++ b/enterprise/backend/src/metabase_enterprise/sandbox/models/params/field_values.clj
@@ -10,7 +10,6 @@
    [metabase.models.field-values :as field-values]
    [metabase.models.params.field-values :as params.field-values]
    [metabase.public-settings.premium-features :refer [defenterprise]]
-   [toucan.db :as db]
    [toucan.hydrate :refer [hydrate]]
    [toucan2.core :as t2]))
 
@@ -28,7 +27,7 @@
   "Find the GTAP for current user that apply to table `table-id`."
   [table-id]
   (let [group-ids (t2/select-fn-set :group_id PermissionsGroupMembership :user_id api/*current-user-id*)
-        gtaps     (db/select GroupTableAccessPolicy
+        gtaps     (t2/select GroupTableAccessPolicy
                              :group_id [:in group-ids]
                              :table_id table-id)]
     (when gtaps
diff --git a/enterprise/backend/src/metabase_enterprise/sandbox/query_processor/middleware/row_level_restrictions.clj b/enterprise/backend/src/metabase_enterprise/sandbox/query_processor/middleware/row_level_restrictions.clj
index d4939966e8dcf27765448e5370091a4219d20ab1..a7b70976d8082232dac81b92e2bc1187f55b0a19 100644
--- a/enterprise/backend/src/metabase_enterprise/sandbox/query_processor/middleware/row_level_restrictions.clj
+++ b/enterprise/backend/src/metabase_enterprise/sandbox/query_processor/middleware/row_level_restrictions.clj
@@ -31,7 +31,6 @@
    [metabase.util.log :as log]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (set! *warn-on-reflection* true)
@@ -75,7 +74,7 @@
     (let [group-ids           (qp.store/cached *current-user-id*
                                 (t2/select-fn-set :group_id PermissionsGroupMembership :user_id *current-user-id*))
           sandboxes           (when (seq group-ids)
-                               (db/select GroupTableAccessPolicy :group_id [:in group-ids]
+                               (t2/select GroupTableAccessPolicy :group_id [:in group-ids]
                                  :table_id [:in table-ids]))
           enforced-sandboxes (mt.api.u/enforced-sandboxes sandboxes group-ids)]
        (when (seq enforced-sandboxes)
diff --git a/enterprise/backend/src/metabase_enterprise/serialization/cmd.clj b/enterprise/backend/src/metabase_enterprise/serialization/cmd.clj
index 4004e8399d6ff9b7fed58b95b3602ac367f8aaab..b27d8369791300211d934f71a894638e72b4a646 100644
--- a/enterprise/backend/src/metabase_enterprise/serialization/cmd.clj
+++ b/enterprise/backend/src/metabase_enterprise/serialization/cmd.clj
@@ -26,7 +26,6 @@
    [metabase.util.log :as log]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (set! *warn-on-reflection* true)
@@ -91,7 +90,7 @@
    (let [state-filter (case state
                         :all nil
                         :active [:= :archived false])]
-     (db/select model {:where [:and
+     (t2/select model {:where [:and
                                [:or [:= :collection_id nil]
                                 (if (not-empty collections)
                                   [:in :collection_id (map u/the-id collections)]
@@ -104,11 +103,11 @@
   ([tables state]
    (case state
      :all
-     (mapcat #(db/select Segment :table_id (u/the-id %)) tables)
+     (mapcat #(t2/select Segment :table_id (u/the-id %)) tables)
      :active
      (filter
       #(not (:archived %))
-      (mapcat #(db/select Segment :table_id (u/the-id %)) tables)))))
+      (mapcat #(t2/select Segment :table_id (u/the-id %)) tables)))))
 
 (defn- select-collections
   "Selects the collections for a given user-id, or all collections without a personal ID if the passed user-id is nil.
@@ -120,14 +119,14 @@
    (let [state-filter     (case state
                             :all nil
                             :active [:= :archived false])
-         base-collections (db/select Collection {:where [:and [:= :location "/"]
+         base-collections (t2/select Collection {:where [:and [:= :location "/"]
                                                               [:or [:= :personal_owner_id nil]
                                                                    [:= :personal_owner_id
                                                                        (some-> users first u/the-id)]]
                                                               state-filter]})]
      (if (empty? base-collections)
        []
-       (-> (db/select Collection
+       (-> (t2/select Collection
                              {:where [:and
                                       (reduce (fn [acc coll]
                                                 (conj acc [:like :location (format "/%d/%%" (:id coll))]))
@@ -141,7 +140,7 @@
   [path {:keys [state user] :or {state :active} :as opts}]
   (log/info (trs "BEGIN DUMP to {0} via user {1}" path user))
   (mdb/setup-db!)
-  (db/select User) ;; TODO -- why??? [editor's note: this comment originally from Cam]
+  (t2/select User) ;; TODO -- why??? [editor's note: this comment originally from Cam]
   (let [users       (if user
                       (let [user (t2/select-one User
                                                 :email        user
@@ -150,17 +149,17 @@
                         [user])
                       [])
         databases   (if (contains? opts :only-db-ids)
-                      (db/select Database :id [:in (:only-db-ids opts)] {:order-by [[:id :asc]]})
-                      (db/select Database))
+                      (t2/select Database :id [:in (:only-db-ids opts)] {:order-by [[:id :asc]]})
+                      (t2/select Database))
         tables      (if (contains? opts :only-db-ids)
-                      (db/select Table :db_id [:in (:only-db-ids opts)] {:order-by [[:id :asc]]})
-                      (db/select Table))
+                      (t2/select Table :db_id [:in (:only-db-ids opts)] {:order-by [[:id :asc]]})
+                      (t2/select Table))
         fields      (if (contains? opts :only-db-ids)
-                      (db/select Field :table_id [:in (map :id tables)] {:order-by [[:id :asc]]})
-                      (db/select Field))
+                      (t2/select Field :table_id [:in (map :id tables)] {:order-by [[:id :asc]]})
+                      (t2/select Field))
         metrics     (if (contains? opts :only-db-ids)
-                      (db/select Metric :table_id [:in (map :id tables)] {:order-by [[:id :asc]]})
-                      (db/select Metric))
+                      (t2/select Metric :table_id [:in (map :id tables)] {:order-by [[:id :asc]]})
+                      (t2/select Metric))
         collections (select-collections users state)]
     (dump/dump path
                databases
@@ -196,7 +195,7 @@
   [path opts]
   (log/info (trs "Exporting Metabase to {0}" path) (u/emoji "🏭 🚛💨"))
   (mdb/setup-db!)
-  (db/select User) ;; TODO -- why??? [editor's note: this comment originally from Cam]
+  (t2/select User) ;; TODO -- why??? [editor's note: this comment originally from Cam]
   (-> (v2-extract opts)
       (v2.storage/store! path))
   (log/info (trs "Export to {0} complete!" path) (u/emoji "🚛💨 📦")))
diff --git a/enterprise/backend/src/metabase_enterprise/serialization/dump.clj b/enterprise/backend/src/metabase_enterprise/serialization/dump.clj
index 94a0c3462b297e4c679d5803bba293936e55efa8..1e68372534394ffc6a2ff8bf79c9edb0a8d58835 100644
--- a/enterprise/backend/src/metabase_enterprise/serialization/dump.clj
+++ b/enterprise/backend/src/metabase_enterprise/serialization/dump.clj
@@ -20,7 +20,6 @@
    [metabase.util.i18n :as i18n :refer [trs]]
    [metabase.util.log :as log]
    [metabase.util.yaml :as yaml]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (set! *warn-on-reflection* true)
@@ -72,7 +71,7 @@
   "Combine all dimensions into a vector and dump it into YAML at in the directory for the
    corresponding schema starting at `path`."
   [path]
-  (doseq [[table-id dimensions] (group-by (comp :table_id Field :field_id) (db/select Dimension))
+  (doseq [[table-id dimensions] (group-by (comp :table_id Field :field_id) (t2/select Dimension))
           :let [table (t2/select-one Table :id table-id)]]
     (spit-yaml (if (:schema table)
                  (format "%s%s/schemas/%s/dimensions.yaml"
diff --git a/enterprise/backend/src/metabase_enterprise/serialization/serialize.clj b/enterprise/backend/src/metabase_enterprise/serialization/serialize.clj
index 6b9f7cd68073c63ec1053a113f5f2bcca49b53ba..183477e4a599d96203008780099369845fa1b455 100644
--- a/enterprise/backend/src/metabase_enterprise/serialization/serialize.clj
+++ b/enterprise/backend/src/metabase_enterprise/serialization/serialize.clj
@@ -25,7 +25,6 @@
    [metabase.models.user :refer [User]]
    [metabase.shared.models.visualization-settings :as mb.viz]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (set! *warn-on-reflection* true)
@@ -191,9 +190,9 @@
 
 (defn- dashboard-cards-for-dashboard
   [dashboard]
-  (let [dashboard-cards   (db/select DashboardCard :dashboard_id (u/the-id dashboard))
+  (let [dashboard-cards   (t2/select DashboardCard :dashboard_id (u/the-id dashboard))
         series            (when (not-empty dashboard-cards)
-                            (db/select DashboardCardSeries
+                            (t2/select DashboardCardSeries
                               :dashboardcard_id [:in (map u/the-id dashboard-cards)]))]
     (for [dashboard-card dashboard-cards]
       (-> dashboard-card
@@ -219,11 +218,11 @@
 (defmethod serialize-one Pulse
   [pulse]
   (assoc pulse
-    :cards    (for [card (db/select PulseCard :pulse_id (u/the-id pulse))]
+    :cards    (for [card (t2/select PulseCard :pulse_id (u/the-id pulse))]
                 (-> card
                     (dissoc :id :pulse_id)
                     (update :card_id (partial fully-qualified-name Card))))
-    :channels (for [channel (db/select PulseChannel :pulse_id (u/the-id pulse))]
+    :channels (for [channel (t2/select PulseChannel :pulse_id (u/the-id pulse))]
                 (strip-crud channel))))
 
 (defmethod serialize-one User
diff --git a/enterprise/backend/src/metabase_enterprise/serialization/v2/backfill_ids.clj b/enterprise/backend/src/metabase_enterprise/serialization/v2/backfill_ids.clj
index 4138bb8276064e7a78e15e0c23adf159df70b367..125f57dd1f7a7afd17b1fdcb630c801ea71a0995 100644
--- a/enterprise/backend/src/metabase_enterprise/serialization/v2/backfill_ids.clj
+++ b/enterprise/backend/src/metabase_enterprise/serialization/v2/backfill_ids.clj
@@ -17,7 +17,7 @@
 (defn backfill-ids-for
   "Updates all rows of a particular model to have `:entity_id` set, based on the [[serdes/identity-hash]]."
   [model]
-  (let [missing (db/select model :entity_id nil)
+  (let [missing (t2/select model :entity_id nil)
         pk      (models/primary-key model)]
     (when (seq missing)
       (log/info (trs "Backfilling entity_id for {0} rows of {1}" (pr-str (count missing)) (name model)))
diff --git a/enterprise/backend/src/metabase_enterprise/serialization/v2/extract.clj b/enterprise/backend/src/metabase_enterprise/serialization/v2/extract.clj
index 901d6e66662a77e7fd1d982d80af10b607740ae2..6c6a2172d0e73ae97725e4ff5066e11c4408a8f6 100644
--- a/enterprise/backend/src/metabase_enterprise/serialization/v2/extract.clj
+++ b/enterprise/backend/src/metabase_enterprise/serialization/v2/extract.clj
@@ -24,7 +24,7 @@
   (b) owned by this user (when user ID is non-nil); or
   (c) descended from one of the above."
   [user-or-nil]
-  (let [roots    (db/select ['Collection :id :location :personal_owner_id] :location "/")
+  (let [roots    (t2/select ['Collection :id :location :personal_owner_id] :location "/")
         unowned  (remove :personal_owner_id roots)
         owned    (when user-or-nil
                    (filter #(= user-or-nil (:personal_owner_id %)) roots))
@@ -83,11 +83,11 @@
   Returns a data structure detailing the gaps. Use [[escape-report]] to output this data in a human-friendly format.
   Returns nil if there are no escaped values, which is useful for a test."
   [collection-ids]
-  (let [collection-set (->> (db/select Collection :id [:in (set collection-ids)])
+  (let [collection-set (->> (t2/select Collection :id [:in (set collection-ids)])
                             (mapcat metabase.models.collection/descendant-ids)
                             set
                             (set/union (set collection-ids)))
-        dashboards     (db/select Dashboard :collection_id [:in collection-set])
+        dashboards     (t2/select Dashboard :collection_id [:in collection-set])
         ;; All cards that are in this collection set.
         cards          (reduce set/union (for [coll-id collection-set]
                                            (t2/select-pks-set Card :collection_id coll-id)))
@@ -96,7 +96,7 @@
         ;; transitive collection set.
         escaped-dashcards  (into {}
                                  (for [dash  dashboards
-                                       :let [dcs (db/select DashboardCard :dashboard_id (:id dash))
+                                       :let [dcs (t2/select DashboardCard :dashboard_id (:id dash))
                                              escapees (->> dcs
                                                            (keep :card_id) ; Text cards have a nil card_id
                                                            set)
diff --git a/enterprise/backend/test/metabase_enterprise/content_management/api/review_test.clj b/enterprise/backend/test/metabase_enterprise/content_management/api/review_test.clj
index c2963f2e62174e2b9d10bfba201923ee4d8079c7..f8f34ec8d1ec21e8deec1fa69bd0f2161252e1b4 100644
--- a/enterprise/backend/test/metabase_enterprise/content_management/api/review_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/content_management/api/review_test.clj
@@ -5,7 +5,8 @@
    [metabase.models.moderation-review :as moderation-review :refer [ModerationReview]]
    [metabase.public-settings.premium-features-test :as premium-features-test]
    [metabase.test :as mt]
-   [toucan.db :as db]))
+   [toucan.db :as db]
+   [toucan2.core :as t2]))
 
 (defn- normalized-response
   [moderation-review]
@@ -62,7 +63,7 @@
                          {:text "Looks good to me" :most_recent false :status "verified"}}
                        (into #{}
                              (map #(select-keys % [:text :status :most_recent]))
-                             (db/select ModerationReview
+                             (t2/select ModerationReview
                                :moderated_item_id card-id
                                :moderated_item_type "card"))))))
             (testing "Ensures we never have more than `modreview/max-moderation-reviews`"
diff --git a/enterprise/backend/test/metabase_enterprise/sandbox/api/permissions_test.clj b/enterprise/backend/test/metabase_enterprise/sandbox/api/permissions_test.clj
index c7405e7d4427bf1f023a818a3b9f09f3c4be3e80..2fd3b279c5f66b972f90cc5f85ed8d25a7c1f744 100644
--- a/enterprise/backend/test/metabase_enterprise/sandbox/api/permissions_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/sandbox/api/permissions_test.clj
@@ -15,7 +15,8 @@
    [metabase.util :as u]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]))
+   [toucan.db :as db]
+   [toucan2.core :as t2]))
 
 (defn- db-graph-keypath [group]
   [:groups (u/the-id group) (mt/id) :data])
@@ -78,7 +79,7 @@
                                       :attribute_remappings (s/eq nil)
                                       s/Keyword             s/Any}
                                      "GTAP")]
-                             (db/select GroupTableAccessPolicy :group_id (u/the-id &group))))))
+                             (t2/select GroupTableAccessPolicy :group_id (u/the-id &group))))))
             (let [graph    (mt/user-http-request :crowberto :get 200 "permissions/graph")
                   graph'   (assoc-in graph (db-graph-keypath &group) (updated-db-perms))
                   response (mt/user-http-request :crowberto :put 200 "permissions/graph" graph')]
@@ -99,7 +100,7 @@
                                    (db-graph-keypath &group))))))
                 (testing "GTAP should be deleted from application DB"
                   (is (= []
-                         (db/select GroupTableAccessPolicy
+                         (t2/select GroupTableAccessPolicy
                                     :group_id (u/the-id &group)
                                     :table_id (mt/id :venues)))))
                 (testing "GTAP for same group, other database should not be affected"
@@ -110,7 +111,7 @@
                                         :permission_id        (s/eq nil)
                                         :attribute_remappings (s/eq nil)}
                                        "GTAP")]
-                               (db/select GroupTableAccessPolicy
+                               (t2/select GroupTableAccessPolicy
                                           :group_id (u/the-id &group)
                                           :table_id (u/the-id db-2-table)))))
                 (testing "GTAP for same table, other group should not be affected"
@@ -121,7 +122,7 @@
                                         :permission_id        (s/eq nil)
                                         :attribute_remappings (s/eq nil)}
                                        "GTAP")]
-                               (db/select GroupTableAccessPolicy :group_id (u/the-id other-group)))))))))))))
+                               (t2/select GroupTableAccessPolicy :group_id (u/the-id other-group)))))))))))))
 
 (deftest grant-sandbox-perms-dont-delete-gtaps-test
   (testing "PUT /api/permissions/graph"
diff --git a/enterprise/backend/test/metabase_enterprise/sandbox/models/params/field_values_test.clj b/enterprise/backend/test/metabase_enterprise/sandbox/models/params/field_values_test.clj
index 6773e4807dd897bbbf9e52ba2f818c2fe16c25d3..d71a7f8423776d2c4356fa6d06a773b8fc61c620 100644
--- a/enterprise/backend/test/metabase_enterprise/sandbox/models/params/field_values_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/sandbox/models/params/field_values_test.clj
@@ -40,7 +40,7 @@
               card-id       (-> f :table_id (#'ee-params.field-values/table-id->gtap) :card :id)
               fv            (params.field-values/get-or-create-advanced-field-values! fv-type f)]
           (is (= [(range 4 6)]
-                 (->> (db/select [FieldValues :values] :field_id categories-id :type fv-type)
+                 (->> (t2/select [FieldValues :values] :field_id categories-id :type fv-type)
                       (map :values))))
           (is (= [4 5] (:values fv)))
           (is (= ["id_4" "id_5"] (:human_readable_values fv)))
@@ -63,7 +63,7 @@
              (t2/select-one Field :id (mt/id :categories :id)))
             (is (= [(range 4 6)
                     (range 2 4)]
-                   (->> (db/select [FieldValues :values]
+                   (->> (t2/select [FieldValues :values]
                                    :field_id categories-id :type fv-type
                                    {:order-by [:id]})
                         (map :values))))))))
diff --git a/enterprise/backend/test/metabase_enterprise/serialization/load_test.clj b/enterprise/backend/test/metabase_enterprise/serialization/load_test.clj
index 2b1bcff7bc247cfeb30983d55c8f53807d3ce717..23c4d51395287fda38f50a50bbf3157adfd1ecf9 100644
--- a/enterprise/backend/test/metabase_enterprise/serialization/load_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/serialization/load_test.clj
@@ -36,7 +36,6 @@
    [metabase.util :as u]
    [metabase.util.i18n :refer [trs]]
    [metabase.util.log :as log]
-   [toucan.db :as db]
    [toucan2.core :as t2])
   (:import
    (org.apache.commons.io FileUtils)))
@@ -218,8 +217,8 @@
   [dashboard _]
   (testing "The dashboard card series were loaded correctly"
     (when (= "My Dashboard" (:name dashboard))
-      (doseq [dashcard (db/select DashboardCard :dashboard_id (u/the-id dashboard))]
-        (doseq [series (db/select DashboardCardSeries :dashboardcard_id (u/the-id dashcard))]
+      (doseq [dashcard (t2/select DashboardCard :dashboard_id (u/the-id dashboard))]
+        (doseq [series (t2/select DashboardCardSeries :dashboardcard_id (u/the-id dashcard))]
           ;; check that the linked :card_id matches the expected name for each in the series
           ;; based on the entities declared in test_util.clj
           (let [series-pos    (:position series)
@@ -274,7 +273,7 @@
 (defmethod assert-loaded-entity Pulse
   [pulse _]
   (is (some? pulse))
-  (let [pulse-cards (db/select PulseCard :pulse_id (u/the-id pulse))]
+  (let [pulse-cards (t2/select PulseCard :pulse_id (u/the-id pulse))]
     (is (= 2 (count pulse-cards)))
     (is (= #{ts/root-card-name "My Card"}
            (into #{} (map (partial t2/select-one-fn :name Card :id) (map :card_id pulse-cards)))))))
diff --git a/enterprise/backend/test/metabase_enterprise/serialization/v2/e2e_test.clj b/enterprise/backend/test/metabase_enterprise/serialization/v2/e2e_test.clj
index e72022d925aaaf82c0b7f64bbc733546369f4998..c8cc6fdb68ec01598fa0ffbc534aa7f965f238aa 100644
--- a/enterprise/backend/test/metabase_enterprise/serialization/v2/e2e_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/serialization/v2/e2e_test.clj
@@ -606,7 +606,7 @@
                          [model-name 'Card]
                          [dash-name  'Dashboard]]]
                   (testing (format "model %s from link cards are loaded properly" model)
-                   (is (some? (db/select model :name name)))))
+                   (is (some? (t2/select model :name name)))))
 
                 (testing "linkcards are loaded with correct fk"
                   (let [new-db-id    (t2/select-one-pk Database :name db-name)
diff --git a/enterprise/backend/test/metabase_enterprise/serialization/v2/load_test.clj b/enterprise/backend/test/metabase_enterprise/serialization/v2/load_test.clj
index e8c3dd2d8c1920b3cf3cf17ec18ea86578e8816b..6b8197615ad8e7a904b9504a0aa50741fc8d10d1 100644
--- a/enterprise/backend/test/metabase_enterprise/serialization/v2/load_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/serialization/v2/load_test.clj
@@ -65,7 +65,7 @@
         (testing "loading into an empty database succeeds"
           (ts/with-dest-db
             (serdes.load/load-metabase (ingestion-in-memory @serialized))
-            (let [colls (db/select Collection)]
+            (let [colls (t2/select Collection)]
               (is (= 1 (count colls)))
               (is (= "Basic Collection" (:name (first colls))))
               (is (= eid1               (:entity_id (first colls)))))))
@@ -73,7 +73,7 @@
         (testing "loading again into the same database does not duplicate"
           (ts/with-dest-db
             (serdes.load/load-metabase (ingestion-in-memory @serialized))
-            (let [colls (db/select Collection)]
+            (let [colls (t2/select Collection)]
               (is (= 1 (count colls)))
               (is (= "Basic Collection" (:name (first colls))))
               (is (= eid1               (:entity_id (first colls)))))))))))
@@ -664,8 +664,8 @@
 
             ;; Fetch the relevant bits
             (reset! timeline2d (t2/select-one Timeline :entity_id (:entity_id @timeline2s)))
-            (reset! eventsT1   (db/select TimelineEvent :timeline_id (:id @timeline1d)))
-            (reset! eventsT2   (db/select TimelineEvent :timeline_id (:id @timeline2d)))
+            (reset! eventsT1   (t2/select TimelineEvent :timeline_id (:id @timeline1d)))
+            (reset! eventsT2   (t2/select TimelineEvent :timeline_id (:id @timeline2d)))
 
             (testing "no duplication - there are two timelines with the right event counts"
               (is (some? @timeline2d))
diff --git a/enterprise/backend/test/metabase_enterprise/sso/integrations/jwt_test.clj b/enterprise/backend/test/metabase_enterprise/sso/integrations/jwt_test.clj
index e24061e8a9c55251e307c0ac3d1ac1cf0d6cca55..4b8178bc6e55f33c3a92a58e8ee4ed6585fba520 100644
--- a/enterprise/backend/test/metabase_enterprise/sso/integrations/jwt_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/sso/integrations/jwt_test.clj
@@ -14,7 +14,6 @@
    [metabase.test :as mt]
    [metabase.test.fixtures :as fixtures]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan.util.test :as tt]
    [toucan2.core :as t2]))
 
@@ -158,7 +157,7 @@
     (with-jwt-default-setup
       (with-users-with-email-deleted "newuser@metabase.com"
         (letfn [(new-user-exists? []
-                  (boolean (seq (db/select User :%lower.email "newuser@metabase.com"))))]
+                  (boolean (seq (t2/select User :%lower.email "newuser@metabase.com"))))]
           (is (= false
                  (new-user-exists?)))
           (let [response (saml-test/client-full-response :get 302 "/auth/sso"
@@ -180,7 +179,7 @@
                        :last_name    "User"
                        :date_joined  true
                        :common_name  "New User"}]
-                     (->> (mt/boolean-ids-and-timestamps (db/select User :email "newuser@metabase.com"))
+                     (->> (mt/boolean-ids-and-timestamps (t2/select User :email "newuser@metabase.com"))
                           (map #(dissoc % :last_login))))))
             (testing "attributes"
               (is (= {"more" "stuff"
@@ -192,7 +191,7 @@
     (with-jwt-default-setup
       (with-users-with-email-deleted "newuser@metabase.com"
         (letfn [(new-user-exists? []
-                  (boolean (seq (db/select User :%lower.email "newuser@metabase.com"))))]
+                  (boolean (seq (t2/select User :%lower.email "newuser@metabase.com"))))]
           (is (= false
                  (new-user-exists?)))
           (let [response (saml-test/client-full-response :get 302 "/auth/sso"
@@ -210,7 +209,7 @@
                        :last_name    nil
                        :date_joined  true
                        :common_name  "newuser@metabase.com"}]
-                     (->> (mt/boolean-ids-and-timestamps (db/select User :email "newuser@metabase.com"))
+                     (->> (mt/boolean-ids-and-timestamps (t2/select User :email "newuser@metabase.com"))
                           (map #(dissoc % :last_login)))))))
           (let [response (saml-test/client-full-response :get 302 "/auth/sso"
                                                            {:request-options {:redirect-strategy :none}}
@@ -229,7 +228,7 @@
                        :last_name    "User"
                        :date_joined  true
                        :common_name  "New User"}]
-                     (->> (mt/boolean-ids-and-timestamps (db/select User :email "newuser@metabase.com"))
+                     (->> (mt/boolean-ids-and-timestamps (t2/select User :email "newuser@metabase.com"))
                           (map #(dissoc % :last_login))))))))))))
 
 (deftest group-mappings-test
diff --git a/enterprise/backend/test/metabase_enterprise/sso/integrations/saml_test.clj b/enterprise/backend/test/metabase_enterprise/sso/integrations/saml_test.clj
index 3b1cb89008845db37a4787b0c1dd438a0c4a1c36..5f897cf668686716095bc71dd648fee617691ed3 100644
--- a/enterprise/backend/test/metabase_enterprise/sso/integrations/saml_test.clj
+++ b/enterprise/backend/test/metabase_enterprise/sso/integrations/saml_test.clj
@@ -438,7 +438,7 @@
                        :last_name    "User"
                        :date_joined  true
                        :common_name  "New User"}]
-                     (->> (mt/boolean-ids-and-timestamps (db/select User :email "newuser@metabase.com"))
+                     (->> (mt/boolean-ids-and-timestamps (t2/select User :email "newuser@metabase.com"))
                           (map #(dissoc % :last_login)))))
               (testing "attributes"
                 (is (= (some-saml-attributes "newuser")
@@ -465,7 +465,7 @@
                        :last_name    nil
                        :date_joined  true
                        :common_name  "newuser@metabase.com"}]
-                     (->> (mt/boolean-ids-and-timestamps (db/select User :email "newuser@metabase.com"))
+                     (->> (mt/boolean-ids-and-timestamps (t2/select User :email "newuser@metabase.com"))
                           (map #(dissoc % :last_login))))))
             ;; login with the same user, but now givenname and surname attributes exist
             (let [req-options (saml-post-request-options (new-user-saml-test-response)
@@ -479,7 +479,7 @@
                        :last_name    "User"
                        :date_joined  true
                        :common_name  "New User"}]
-                     (->> (mt/boolean-ids-and-timestamps (db/select User :email "newuser@metabase.com"))
+                     (->> (mt/boolean-ids-and-timestamps (t2/select User :email "newuser@metabase.com"))
                           (map #(dissoc % :last_login))))))
             (finally
               (t2/delete! User :%lower.email "newuser@metabase.com"))))))))
diff --git a/modules/drivers/bigquery-cloud-sdk/test/metabase/driver/bigquery_cloud_sdk_test.clj b/modules/drivers/bigquery-cloud-sdk/test/metabase/driver/bigquery_cloud_sdk_test.clj
index 683549282a604799244144dabf9c0e2b223e8507..18f0c26890c82b11d2b5bf5961d74ff5d855d113 100644
--- a/modules/drivers/bigquery-cloud-sdk/test/metabase/driver/bigquery_cloud_sdk_test.clj
+++ b/modules/drivers/bigquery-cloud-sdk/test/metabase/driver/bigquery_cloud_sdk_test.clj
@@ -260,7 +260,7 @@
         (mt/with-db temp-db
           (testing " for sync"
             (sync/sync-database! temp-db {:scan :schema})
-            (let [[tbl & more-tbl] (db/select Table :db_id db-id)]
+            (let [[tbl & more-tbl] (t2/select Table :db_id db-id)]
               (is (some? tbl))
               (is (nil? more-tbl))
               (is (= "taxi_trips" (:name tbl)))
@@ -333,11 +333,11 @@
     (mt/test-driver :bigquery-cloud-sdk
       (mt/dataset avian-singles
         (try
-          (let [synced-tables (db/select Table :db_id (mt/id))]
+          (let [synced-tables (t2/select Table :db_id (mt/id))]
             (is (= 2 (count synced-tables)))
             (db/insert-many! Table (map #(dissoc % :id :schema) synced-tables))
             (sync/sync-database! (mt/db) {:scan :schema})
-            (let [synced-tables (db/select Table :db_id (mt/id))]
+            (let [synced-tables (t2/select Table :db_id (mt/id))]
               (is (partial= {true [{:name "messages"} {:name "users"}]
                              false [{:name "messages"} {:name "users"}]}
                             (-> (group-by :active synced-tables)
diff --git a/modules/drivers/mongo/test/metabase/driver/mongo/query_processor_test.clj b/modules/drivers/mongo/test/metabase/driver/mongo/query_processor_test.clj
index 649a5cee3a30929c2ff06343cd3306e09628d072..409684ec714f2b3392229274aa47380c35db6f5a 100644
--- a/modules/drivers/mongo/test/metabase/driver/mongo/query_processor_test.clj
+++ b/modules/drivers/mongo/test/metabase/driver/mongo/query_processor_test.clj
@@ -11,7 +11,6 @@
             [metabase.test :as mt]
             [metabase.util :as u]
             [schema.core :as s]
-            [toucan.db :as db]
             [toucan2.core :as t2]))
 
 (deftest query->collection-name-test
@@ -238,7 +237,7 @@
                      :breakout    [$tips.source.username]}))))
           (testing "Parent fields are removed from projections when child fields are included (#19135)"
             (let [table       (t2/select-one Table :db_id (mt/id))
-                  fields      (db/select Field :table_id (u/the-id table))
+                  fields      (t2/select Field :table_id (u/the-id table))
                   projections (-> (mongo.qp/mbql->native
                                     (mt/mbql-query tips {:fields (mapv (fn [f]
                                                                          [:field (u/the-id f) nil])
diff --git a/modules/drivers/mongo/test/metabase/driver/mongo_test.clj b/modules/drivers/mongo/test/metabase/driver/mongo_test.clj
index 620b6179a8b4faf8f3325b5d44436cb95ba0d30d..9238ba3450322286f63a65d734aa29178b15a5ba 100644
--- a/modules/drivers/mongo/test/metabase/driver/mongo_test.clj
+++ b/modules/drivers/mongo/test/metabase/driver/mongo_test.clj
@@ -200,7 +200,7 @@
               {:name "name",           :database_type "java.lang.String", :base_type :type/Text,    :semantic_type :type/Name}]
              (map
               (partial into {})
-              (db/select [Field :name :database_type :base_type :semantic_type]
+              (t2/select [Field :name :database_type :base_type :semantic_type]
                 :table_id (mt/id :bird_species)
                 {:order-by [:name]})))))))
 
@@ -227,7 +227,7 @@
                    {:name "max_wingspan", :database_type "java.lang.Long", :base_type :type/Integer, :semantic_type nil}}
                  (into #{}
                        (map (partial into {}))
-                       (db/select [Field :name :database_type :base_type :semantic_type]
+                       (t2/select [Field :name :database_type :base_type :semantic_type]
                          :table_id (mt/id :bird_species)
                          {:order-by [:name]})))))))))
 
@@ -252,7 +252,7 @@
             {:active true, :name "checkins"}
             {:active true, :name "users"}
             {:active true, :name "venues"}]
-           (for [field (db/select [Table :name :active]
+           (for [field (t2/select [Table :name :active]
                          :db_id (mt/id)
                          {:order-by [:name]})]
              (into {} field)))
@@ -278,7 +278,7 @@
                {:semantic_type :type/Name,      :base_type :type/Text,     :name "name"}
                {:semantic_type :type/Category,  :base_type :type/Integer,  :name "price"}]]
              (vec (for [table-name table-names]
-                    (vec (for [field (db/select [Field :name :base_type :semantic_type]
+                    (vec (for [field (t2/select [Field :name :base_type :semantic_type]
                                        :active   true
                                        :table_id (mt/id table-name)
                                        {:order-by [:name]})]
diff --git a/modules/drivers/presto-jdbc/test/metabase/driver/presto_jdbc_test.clj b/modules/drivers/presto-jdbc/test/metabase/driver/presto_jdbc_test.clj
index 837fd345f53617c342f1983832c8f6f932373af7..2e3f28813ba867fab2731b60ac2804e78a2a0e34 100644
--- a/modules/drivers/presto-jdbc/test/metabase/driver/presto_jdbc_test.clj
+++ b/modules/drivers/presto-jdbc/test/metabase/driver/presto_jdbc_test.clj
@@ -19,7 +19,6 @@
    [metabase.test.data.presto-jdbc :as data.presto-jdbc]
    [metabase.test.fixtures :as fixtures]
    [metabase.util.honeysql-extensions :as hx]
-   [toucan.db :as db]
    [toucan2.core :as t2])
   (:import
    (java.io File)))
@@ -205,7 +204,7 @@
             ;; same as test_data, but with schema, so should NOT pick up venues, users, etc.
             (sync/sync-database! db)
             (is (= [{:name t, :schema s, :db_id (mt/id)}]
-                   (map #(select-keys % [:name :schema :db_id]) (db/select Table :db_id (mt/id)))))))
+                   (map #(select-keys % [:name :schema :db_id]) (t2/select Table :db_id (mt/id)))))))
         (execute-ddl! [(format "DROP TABLE %s.%s" s t)
                        (format "DROP SCHEMA %s" s)])))))
 
diff --git a/modules/drivers/redshift/test/metabase/driver/redshift_test.clj b/modules/drivers/redshift/test/metabase/driver/redshift_test.clj
index db316942c0a105dbfc6fe357b0341f178321b63f..7ae90e76522abca7edf9e796b4446567de9c863c 100644
--- a/modules/drivers/redshift/test/metabase/driver/redshift_test.clj
+++ b/modules/drivers/redshift/test/metabase/driver/redshift_test.clj
@@ -27,7 +27,6 @@
    [metabase.util.honey-sql-2 :as h2x]
    #_{:clj-kondo/ignore [:discouraged-namespace]}
    [metabase.util.honeysql-extensions :as hx]
-   [toucan.db :as db]
    [toucan2.core :as t2])
   (:import
    (metabase.plugins.jdbc_proxy ProxyDriver)))
@@ -235,7 +234,7 @@
                     {:name "weird_varchar", :database_type "character varying(50)", :base_type :type/Text}]
                    (map
                     mt/derecordize
-                    (db/select [Field :name :database_type :base_type] :table_id table-id {:order-by [:name]})))))
+                    (t2/select [Field :name :database_type :base_type] :table_id table-id {:order-by [:name]})))))
           (finally
             (redshift.test/execute! (str "DROP TABLE IF EXISTS %s;%n"
                                          "DROP VIEW IF EXISTS %s;")
@@ -268,7 +267,7 @@
              (is (= [{:name "case_when_numeric_inc_nulls", :database_type "numeric",              :base_type :type/Decimal}
                      {:name "raw_null",                    :database_type "varchar",              :base_type :type/Text}
                      {:name "raw_var",                     :database_type "character varying(5)", :base_type :type/Text}]
-                    (db/select [Field :name :database_type :base_type] :table_id table-id {:order-by [:name]}))))
+                    (t2/select [Field :name :database_type :base_type] :table_id table-id {:order-by [:name]}))))
            (finally
              (redshift.test/execute! (str "DROP VIEW IF EXISTS %s;")
                                      qual-view-nm))))))))
diff --git a/modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj b/modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj
index 959513ef1f81bcd9a61a92c6135a496cc37685c8..a8debfbfba56e9efab4618f3cdf3425d2fcb005e 100644
--- a/modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj
+++ b/modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj
@@ -20,7 +20,6 @@
    [metabase.util :as u]
    #_{:clj-kondo/ignore [:discouraged-namespace]}
    [metabase.util.honeysql-extensions :as hx]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (set! *warn-on-reflection* true)
@@ -118,7 +117,7 @@
             ;; now take a look at the Tables in the database, there should be an entry for the view
             (is (= [{:name "example_view"}]
                    (map (partial into {})
-                        (db/select [Table :name] :db_id (u/the-id database)))))))))))
+                        (t2/select [Table :name] :db_id (u/the-id database)))))))))))
 
 (deftest describe-table-test
   (mt/test-driver :snowflake
diff --git a/modules/drivers/sqlite/test/metabase/driver/sqlite_test.clj b/modules/drivers/sqlite/test/metabase/driver/sqlite_test.clj
index eda0a8bd8bb3ea6821b1c28462d2ecf43d0fbaf1..ac42dcfcb95ed5123c6ad9ec46dc7005c085c705 100644
--- a/modules/drivers/sqlite/test/metabase/driver/sqlite_test.clj
+++ b/modules/drivers/sqlite/test/metabase/driver/sqlite_test.clj
@@ -14,7 +14,6 @@
    [metabase.test :as mt]
    [metabase.test.data :as data]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan.hydrate :refer [hydrate]]
    [toucan2.core :as t2]))
 
@@ -77,7 +76,7 @@
                              :base_type :type/Integer}
                             {:name      "time"
                              :base_type :type/Text}]}]
-                 (->> (hydrate (db/select Table :db_id db-id {:order-by [:name]}) :fields)
+                 (->> (hydrate (t2/select Table :db_id db-id {:order-by [:name]}) :fields)
                       (map table-fingerprint))))
           (doseq [statement ["drop view if exists v_groupby_test;"
                              "drop table if exists groupby_test;"
@@ -113,7 +112,7 @@
                              :base_type :type/Text}
                             {:name      "totalValue"
                              :base_type :type/Float}]}]
-                 (->> (hydrate (db/select Table :db_id db-id
+                 (->> (hydrate (t2/select Table :db_id db-id
                                           {:where    [:in :name ["groupby_test" "v_groupby_test"]]
                                            :order-by [:name]}) :fields)
                       (map table-fingerprint)))))))))
diff --git a/src/metabase/analytics/stats.clj b/src/metabase/analytics/stats.clj
index 1e424d28bab380f386636ccb8d084a90df35bdb2..293ffc8567d4064c13a86c80372ab86f014f6ce7 100644
--- a/src/metabase/analytics/stats.clj
+++ b/src/metabase/analytics/stats.clj
@@ -145,7 +145,7 @@
   "Get metrics based on user records.
   TODO: get activity in terms of created questions, pulses and dashboards"
   []
-  {:users (merge-count-maps (for [user (db/select [User :is_active :is_superuser :last_login :google_auth])]
+  {:users (merge-count-maps (for [user (t2/select [User :is_active :is_superuser :last_login :google_auth])]
                               {:total     1
                                :active    (:is_active    user)
                                :admin     (:is_superuser user)
@@ -165,7 +165,7 @@
   "Get metrics based on questions
   TODO characterize by # executions and avg latency"
   []
-  (let [cards (db/select [Card :query_type :public_uuid :enable_embedding :embedding_params :dataset_query])]
+  (let [cards (t2/select [Card :query_type :public_uuid :enable_embedding :embedding_params :dataset_query])]
     {:questions (merge-count-maps (for [card cards]
                                     (let [native? (= (keyword (:query_type card)) :native)]
                                       {:total       1
@@ -189,8 +189,8 @@
   "Get metrics based on dashboards
   TODO characterize by # of revisions, and created by an admin"
   []
-  (let [dashboards (db/select [Dashboard :creator_id :public_uuid :parameters :enable_embedding :embedding_params])
-        dashcards  (db/select [DashboardCard :card_id :dashboard_id])]
+  (let [dashboards (t2/select [Dashboard :creator_id :public_uuid :parameters :enable_embedding :embedding_params])
+        dashcards  (t2/select [DashboardCard :card_id :dashboard_id])]
     {:dashboards         (count dashboards)
      :with_params        (count (filter (comp seq :parameters) dashboards))
      :num_dashs_per_user (medium-histogram dashboards :creator_id)
@@ -232,7 +232,7 @@
     ;; -> {\"googleanalytics\" 4, \"postgres\" 48, \"h2\" 9}"
   {:style/indent 2}
   [model column & [additonal-honeysql]]
-  (into {} (for [{:keys [k count]} (db/select [model [column :k] [:%count.* :count]]
+  (into {} (for [{:keys [k count]} (t2/select [model [column :k] [:%count.* :count]]
                                      (merge {:group-by [column]}
                                             additonal-honeysql))]
              [k count])))
@@ -284,8 +284,8 @@
 (defn- collection-metrics
   "Get metrics on Collection usage."
   []
-  (let [collections (db/select Collection)
-        cards       (db/select [Card :collection_id])]
+  (let [collections (t2/select Collection)
+        cards       (t2/select [Card :collection_id])]
     {:collections              (count collections)
      :cards_in_collections     (count (filter :collection_id cards))
      :cards_not_in_collections (count (remove :collection_id cards))
@@ -295,7 +295,7 @@
 (defn- database-metrics
   "Get metrics based on Databases."
   []
-  (let [databases (db/select [Database :is_full_sync :engine :dbms_version])]
+  (let [databases (t2/select [Database :is_full_sync :engine :dbms_version])]
     {:databases (merge-count-maps (for [{is-full-sync? :is_full_sync} databases]
                                     {:total    1
                                      :analyzed is-full-sync?}))
@@ -309,7 +309,7 @@
 (defn- table-metrics
   "Get metrics based on Tables."
   []
-  (let [tables (db/select [Table :db_id :schema])]
+  (let [tables (t2/select [Table :db_id :schema])]
     {:tables           (count tables)
      :num_per_database (medium-histogram tables :db_id)
      :num_per_schema   (medium-histogram tables :schema)}))
@@ -317,7 +317,7 @@
 (defn- field-metrics
   "Get metrics based on Fields."
   []
-  (let [fields (db/select [Field :table_id])]
+  (let [fields (t2/select [Field :table_id])]
     {:fields        (count fields)
      :num_per_table (medium-histogram fields :table_id)}))
 
diff --git a/src/metabase/api/action.clj b/src/metabase/api/action.clj
index c1d3788417b40fb82d1e2c7a78dfd90c4ed03753..f2531a8c191784cb50b0a99e5b8c9cc274d4ca85 100644
--- a/src/metabase/api/action.clj
+++ b/src/metabase/api/action.clj
@@ -16,7 +16,6 @@
    [metabase.util.i18n :refer [deferred-tru tru]]
    [metabase.util.malli :as mu]
    [metabase.util.malli.schema :as ms]
-   [toucan.db :as db]
    [toucan.hydrate :refer [hydrate]]
    [toucan2.core :as t2])
   (:import
@@ -84,7 +83,7 @@
   []
   (validation/check-has-application-permission :setting)
   (validation/check-public-sharing-enabled)
-  (db/select [Action :name :id :public_uuid :model_id], :public_uuid [:not= nil], :archived false))
+  (t2/select [Action :name :id :public_uuid :model_id], :public_uuid [:not= nil], :archived false))
 
 (api/defendpoint GET "/:action-id"
   [action-id]
diff --git a/src/metabase/api/activity.clj b/src/metabase/api/activity.clj
index ad7d9bef36696a6c8949af79c4b8755a42cbb589..717d06750cd8f461160cc16efe0da46c5b23383d 100644
--- a/src/metabase/api/activity.clj
+++ b/src/metabase/api/activity.clj
@@ -88,13 +88,13 @@
 (api/defendpoint-schema GET "/"
   "Get recent activity."
   []
-  (filter mi/can-read? (-> (db/select Activity, {:order-by [[:timestamp :desc]], :limit 40})
+  (filter mi/can-read? (-> (t2/select Activity, {:order-by [[:timestamp :desc]], :limit 40})
                            (hydrate :user :table :database)
                            add-model-exists-info)))
 
 (defn- models-query
   [model ids]
-  (db/select
+  (t2/select
       (case model
         "card"      [Card
                      :id :name :collection_id :description :display
@@ -146,7 +146,7 @@
   from the query_execution table. The query context is always a `:question`. The results are normalized and concatenated to the
   query results for dashboard and table views."
   [views-limit card-runs-limit all-users?]
-  (let [dashboard-and-table-views (db/select [ViewLog
+  (let [dashboard-and-table-views (t2/select [ViewLog
                                               [[:min :view_log.user_id] :user_id]
                                               :model
                                               :model_id
@@ -164,7 +164,7 @@
                                                            [:= :model "dashboard"]
                                                            [:= :bm.user_id *current-user-id*]
                                                            [:= :model_id :bm.dashboard_id]]]})
-        card-runs                 (->> (db/select [QueryExecution
+        card-runs                 (->> (t2/select [QueryExecution
                                                    [:%min.executor_id :user_id]
                                                    [(db/qualify QueryExecution :card_id) :model_id]
                                                    [:%count.* :cnt]
diff --git a/src/metabase/api/card.clj b/src/metabase/api/card.clj
index da51fce862c556ae78abc0e3b79f830e030e974d..eaa3c7687539b93fe4a0938376ff446bc816ed09 100644
--- a/src/metabase/api/card.clj
+++ b/src/metabase/api/card.clj
@@ -72,17 +72,17 @@
 ;; return all Cards. This is the default filter option.
 (defmethod cards-for-filter-option* :all
   [_]
-  (db/select Card, :archived false, {:order-by [[:%lower.name :asc]]}))
+  (t2/select Card, :archived false, {:order-by [[:%lower.name :asc]]}))
 
 ;; return Cards created by the current user
 (defmethod cards-for-filter-option* :mine
   [_]
-  (db/select Card, :creator_id api/*current-user-id*, :archived false, {:order-by [[:%lower.name :asc]]}))
+  (t2/select Card, :creator_id api/*current-user-id*, :archived false, {:order-by [[:%lower.name :asc]]}))
 
 ;; return all Cards bookmarked by the current user.
 (defmethod cards-for-filter-option* :bookmarked
   [_]
-  (let [cards (for [{{:keys [archived], :as card} :card} (hydrate (db/select [CardBookmark :card_id]
+  (let [cards (for [{{:keys [archived], :as card} :card} (hydrate (t2/select [CardBookmark :card_id]
                                                                     :user_id api/*current-user-id*)
                                                                   :card)
                     :when                                 (not archived)]
@@ -92,25 +92,25 @@
 ;; Return all Cards belonging to Database with `database-id`.
 (defmethod cards-for-filter-option* :database
   [_ database-id]
-  (db/select Card, :database_id database-id, :archived false, {:order-by [[:%lower.name :asc]]}))
+  (t2/select Card, :database_id database-id, :archived false, {:order-by [[:%lower.name :asc]]}))
 
 ;; Return all Cards belonging to `Table` with `table-id`.
 (defmethod cards-for-filter-option* :table
   [_ table-id]
-  (db/select Card, :table_id table-id, :archived false, {:order-by [[:%lower.name :asc]]}))
+  (t2/select Card, :table_id table-id, :archived false, {:order-by [[:%lower.name :asc]]}))
 
 (s/defn ^:private cards-with-ids :- (s/maybe [(mi/InstanceOf Card)])
   "Return unarchived Cards with `card-ids`.
   Make sure cards are returned in the same order as `card-ids`; `[in card-ids]` won't preserve the order."
   [card-ids :- [su/IntGreaterThanZero]]
   (when (seq card-ids)
-    (let [card-id->card (m/index-by :id (db/select Card, :id [:in (set card-ids)], :archived false))]
+    (let [card-id->card (m/index-by :id (t2/select Card, :id [:in (set card-ids)], :archived false))]
       (filter identity (map card-id->card card-ids)))))
 
 ;; Return the 10 Cards most recently viewed by the current user, sorted by how recently they were viewed.
 (defmethod cards-for-filter-option* :recent
   [_]
-  (cards-with-ids (map :model_id (db/select [ViewLog :model_id [:%max.timestamp :max]]
+  (cards-with-ids (map :model_id (t2/select [ViewLog :model_id [:%max.timestamp :max]]
                                    :model   "card"
                                    :user_id api/*current-user-id*
                                    {:group-by [:model_id]
@@ -122,7 +122,7 @@
 ;; being).
 (defmethod cards-for-filter-option* :popular
   [_]
-  (cards-with-ids (map :model_id (db/select [ViewLog :model_id [:%count.* :count]]
+  (cards-with-ids (map :model_id (t2/select [ViewLog :model_id [:%count.* :count]]
                                    :model "card"
                                    {:group-by [:model_id]
                                     :order-by [[:count :desc]]}))))
@@ -130,7 +130,7 @@
 ;; Cards that have been archived.
 (defmethod cards-for-filter-option* :archived
   [_]
-  (db/select Card, :archived true, {:order-by [[:%lower.name :asc]]}))
+  (t2/select Card, :archived true, {:order-by [[:%lower.name :asc]]}))
 
 ;; Cards that are using a given model.
 (defmethod cards-for-filter-option* :using_model
@@ -712,7 +712,7 @@ saved later when it is ready."
     (api/write-check Collection new-collection-id-or-nil))
   ;; for each affected card...
   (when (seq card-ids)
-    (let [cards (db/select [Card :id :collection_id :collection_position :dataset_query]
+    (let [cards (t2/select [Card :id :collection_id :collection_position :dataset_query]
                   {:where [:and [:in :id (set card-ids)]
                                 [:or [:not= :collection_id new-collection-id-or-nil]
                                   (when new-collection-id-or-nil
@@ -830,7 +830,7 @@ saved later when it is ready."
   []
   (validation/check-has-application-permission :setting)
   (validation/check-public-sharing-enabled)
-  (db/select [Card :name :id :public_uuid], :public_uuid [:not= nil], :archived false))
+  (t2/select [Card :name :id :public_uuid], :public_uuid [:not= nil], :archived false))
 
 #_{:clj-kondo/ignore [:deprecated-var]}
 (api/defendpoint-schema GET "/embeddable"
@@ -839,7 +839,7 @@ saved later when it is ready."
   []
   (validation/check-has-application-permission :setting)
   (validation/check-embedding-enabled)
-  (db/select [Card :name :id], :enable_embedding true, :archived false))
+  (t2/select [Card :name :id], :enable_embedding true, :archived false))
 
 #_{:clj-kondo/ignore [:deprecated-var]}
 (api/defendpoint-schema GET "/:id/related"
diff --git a/src/metabase/api/collection.clj b/src/metabase/api/collection.clj
index d36f40972e51b4e750b07820f99da87176c8c941..e5e75a7fadc271a14a338c4fa6cdc68a0931cc71 100644
--- a/src/metabase/api/collection.clj
+++ b/src/metabase/api/collection.clj
@@ -76,7 +76,7 @@
    namespace (s/maybe su/NonBlankString)}
   (let [archived? (Boolean/parseBoolean archived)
         exclude-other-user-collections? (Boolean/parseBoolean exclude-other-user-collections)]
-    (as-> (db/select Collection
+    (as-> (t2/select Collection
             {:where    [:and
                         [:= :archived archived?]
                         [:= :namespace namespace]
@@ -139,7 +139,7 @@
                                                           :from            [:report_card]
                                                           :where           [:= :archived false]}))
         colls (cond->>
-                (db/select Collection
+                (t2/select Collection
                   {:where [:and
                            (when exclude-archived?
                              [:= :archived false])
@@ -166,7 +166,7 @@
                                                                                :from            [:report_card]
                                                                                :where           [:= :archived false]}))
            colls                           (cond->>
-                                             (db/select Collection
+                                             (t2/select Collection
                                                {:where [:and
                                                         (when exclude-archived?
                                                           [:= :archived false])
diff --git a/src/metabase/api/dashboard.clj b/src/metabase/api/dashboard.clj
index 8732c55e86c30d2564fcc3c4a95d519ba05110c6..5aee63a5b3f0a0fdc7b6e38f6caa8f063e7e8310 100644
--- a/src/metabase/api/dashboard.clj
+++ b/src/metabase/api/dashboard.clj
@@ -51,7 +51,7 @@
 (set! *warn-on-reflection* true)
 
 (defn- dashboards-list [filter-option]
-  (as-> (db/select Dashboard {:where    [:and (case (or (keyword filter-option) :all)
+  (as-> (t2/select Dashboard {:where    [:and (case (or (keyword filter-option) :all)
                                                 (:all :archived)  true
                                                 :mine [:= :creator_id api/*current-user-id*])
                                          [:= :archived (= (keyword filter-option) :archived)]]
@@ -644,7 +644,7 @@
   []
   (validation/check-has-application-permission :setting)
   (validation/check-public-sharing-enabled)
-  (db/select [Dashboard :name :id :public_uuid], :public_uuid [:not= nil], :archived false))
+  (t2/select [Dashboard :name :id :public_uuid], :public_uuid [:not= nil], :archived false))
 
 #_{:clj-kondo/ignore [:deprecated-var]}
 (api/defendpoint-schema GET "/embeddable"
@@ -653,7 +653,7 @@
   []
   (validation/check-has-application-permission :setting)
   (validation/check-embedding-enabled)
-  (db/select [Dashboard :name :id], :enable_embedding true, :archived false))
+  (t2/select [Dashboard :name :id], :enable_embedding true, :archived false))
 
 #_{:clj-kondo/ignore [:deprecated-var]}
 (api/defendpoint-schema GET "/:id/related"
diff --git a/src/metabase/api/database.clj b/src/metabase/api/database.clj
index 09d6ea14ba612d91289fb0c0e813c0d57515725d..979cd41f229eb305704ab756bc8ab48c5cc27a62 100644
--- a/src/metabase/api/database.clj
+++ b/src/metabase/api/database.clj
@@ -64,7 +64,7 @@
 ;;; ----------------------------------------------- GET /api/database ------------------------------------------------
 
 (defn- add-tables [dbs]
-  (let [db-id->tables (group-by :db_id (filter mi/can-read? (db/select Table
+  (let [db-id->tables (group-by :db_id (filter mi/can-read? (t2/select Table
                                                               :active          true
                                                               :db_id           [:in (map :id dbs)]
                                                               :visibility_type nil
@@ -229,7 +229,7 @@
              include-saved-questions-tables?
              include-editable-data-model?
              exclude-uneditable-details?]}]
-  (let [dbs (db/select Database {:order-by [:%lower.name :%lower.engine]})
+  (let [dbs (t2/select Database {:order-by [:%lower.name :%lower.engine]})
         filter-by-data-access? (not (or include-editable-data-model? exclude-uneditable-details?))]
     (cond-> (add-native-perms-info dbs)
       include-tables?              add-tables
@@ -481,7 +481,7 @@
 ;;; --------------------------------- GET /api/database/:id/autocomplete_suggestions ---------------------------------
 
 (defn- autocomplete-tables [db-id search-string limit]
-  (db/select [Table :id :db_id :schema :name]
+  (t2/select [Table :id :db_id :schema :name]
     {:where    [:and [:= :db_id db-id]
                      [:= :active true]
                      [:like :%lower.name (u/lower-case-en search-string)]
@@ -503,7 +503,7 @@
                         second
                         (str/replace #"-" " ")
                         u/lower-case-en)]
-    (db/select [Card :id :dataset :database_id :name :collection_id [:collection.name :collection_name]]
+    (t2/select [Card :id :dataset :database_id :name :collection_id [:collection.name :collection_name]]
                {:where    [:and
                            [:= :report_card.database_id database-id]
                            [:= :report_card.archived false]
@@ -529,7 +529,7 @@
                 :limit    50})))
 
 (defn- autocomplete-fields [db-id search-string limit]
-  (db/select [Field :name :base_type :semantic_type :id :table_id [:table.name :table_name]]
+  (t2/select [Field :name :base_type :semantic_type :id :table_id [:table.name :table_name]]
              :metabase_field.active          true
              :%lower.metabase_field/name     [:like (u/lower-case-en search-string)]
              :metabase_field.visibility_type [:not-in ["sensitive" "retired"]]
@@ -634,7 +634,7 @@
   "Get a list of all `Fields` in `Database`."
   [id]
   (api/read-check Database id)
-  (let [fields (filter mi/can-read? (-> (db/select [Field :id :name :display_name :table_id :base_type :semantic_type]
+  (let [fields (filter mi/can-read? (-> (t2/select [Field :id :name :display_name :table_id :base_type :semantic_type]
                                           :table_id        [:in (t2/select-fn-set :id Table, :db_id id)]
                                           :visibility_type [:not-in ["sensitive" "retired"]])
                                         (hydrate :table)))]
@@ -1094,7 +1094,7 @@
 (defn- schema-tables-list [db-id schema]
   (api/read-check Database db-id)
   (api/check-403 (can-read-schema? db-id schema))
-  (filter mi/can-read? (db/select Table
+  (filter mi/can-read? (t2/select Table
                          :db_id           db-id
                          :schema          schema
                          :active          true
diff --git a/src/metabase/api/login_history.clj b/src/metabase/api/login_history.clj
index c275a8796694ba9e6c7942c60d5cacde462897c1..f07cbf1da0f033fbd0c5a5c709d6db5413295229 100644
--- a/src/metabase/api/login_history.clj
+++ b/src/metabase/api/login_history.clj
@@ -4,7 +4,7 @@
    [metabase.api.common :as api]
    [metabase.models.login-history :as login-history :refer [LoginHistory]]
    [metabase.util :as u]
-   [toucan.db :as db]))
+   [toucan2.core :as t2]))
 
 (defn login-history
   "Return complete login history (sorted by most-recent -> least-recent) for `user-or-id`"
@@ -13,7 +13,7 @@
   ;; nice to be able to see every log in that's every happened with an account. Maybe we should page this, or page the
   ;; API endpoint?
   (login-history/human-friendly-infos
-   (db/select [LoginHistory :timestamp :session_id :device_description :ip_address]
+   (t2/select [LoginHistory :timestamp :session_id :device_description :ip_address]
               :user_id (u/the-id user-or-id)
               {:order-by [[:timestamp :desc]]})))
 
diff --git a/src/metabase/api/metric.clj b/src/metabase/api/metric.clj
index 210b63ef0a9a80687f43082c41e1442d17ac41d8..cf84716892da5b1f6f4c676fd42a646077384f31 100644
--- a/src/metabase/api/metric.clj
+++ b/src/metabase/api/metric.clj
@@ -72,7 +72,7 @@
 (api/defendpoint-schema GET "/"
   "Fetch *all* `Metrics`."
   []
-  (as-> (db/select Metric, :archived false, {:order-by [:%lower.name]}) metrics
+  (as-> (t2/select Metric, :archived false, {:order-by [:%lower.name]}) metrics
     (hydrate metrics :creator)
     (add-db-ids metrics)
     (filter mi/can-read? metrics)
diff --git a/src/metabase/api/native_query_snippet.clj b/src/metabase/api/native_query_snippet.clj
index 78ef45fde334d1244e572a0eec6277a53c9b9369..9c938173360292421763c92de561f93b47078c28 100644
--- a/src/metabase/api/native_query_snippet.clj
+++ b/src/metabase/api/native_query_snippet.clj
@@ -28,7 +28,7 @@
   "Fetch all snippets"
   [archived]
   {archived (s/maybe su/BooleanString)}
-  (let [snippets (db/select NativeQuerySnippet
+  (let [snippets (t2/select NativeQuerySnippet
                             :archived (Boolean/parseBoolean archived)
                             {:order-by [[:%lower.name :asc]]})]
     (hydrate (filter mi/can-read? snippets) :creator)))
diff --git a/src/metabase/api/permissions.clj b/src/metabase/api/permissions.clj
index f40654a102a6d935eefaa88cb10e5ae28a076811..b6727dc74c8dce42303939f3c43f072b5025c270 100644
--- a/src/metabase/api/permissions.clj
+++ b/src/metabase/api/permissions.clj
@@ -113,7 +113,7 @@
 (defn- ordered-groups
   "Return a sequence of ordered `PermissionsGroups`."
   [limit offset query]
-  (db/select PermissionsGroup
+  (t2/select PermissionsGroup
              (cond-> {:order-by [:%lower.name]}
                (some? limit)  (sql.helpers/limit  limit)
                (some? offset) (sql.helpers/offset offset)
@@ -199,7 +199,7 @@
                  :is_group_manager boolean}]}"
   []
   (validation/check-group-manager)
-  (group-by :user_id (db/select [PermissionsGroupMembership [:id :membership_id] :group_id :user_id :is_group_manager]
+  (group-by :user_id (t2/select [PermissionsGroupMembership [:id :membership_id] :group_id :user_id :is_group_manager]
                                 (cond-> {}
                                   (and (not api/*is-superuser?*)
                                        api/*is-group-manager?*)
diff --git a/src/metabase/api/persist.clj b/src/metabase/api/persist.clj
index 76b320930904089eba4ad5c28e01b5c601e8bc6d..9e3a2a8ee7d9cd133f2cbc9ae17222e8744a80c9 100644
--- a/src/metabase/api/persist.clj
+++ b/src/metabase/api/persist.clj
@@ -66,7 +66,7 @@
   (validation/check-has-application-permission :monitoring)
   (let [db-ids (t2/select-fn-set :database_id PersistedInfo)
         writable-db-ids (when (seq db-ids)
-                          (->> (db/select Database :id [:in db-ids])
+                          (->> (t2/select Database :id [:in db-ids])
                                (filter mi/can-write?)
                                (map :id)
                                set))
@@ -138,7 +138,7 @@
   - remove `:persist-models-enabled` from relevant [[Database]] options
   - schedule a task to [[metabase.driver.ddl.interface/unpersist]] each table"
   []
-  (let [id->db      (m/index-by :id (db/select Database))
+  (let [id->db      (m/index-by :id (t2/select Database))
         enabled-dbs (filter (comp :persist-models-enabled :options) (vals id->db))]
     (log/info (tru "Disabling model persistence"))
     (doseq [db enabled-dbs]
diff --git a/src/metabase/api/segment.clj b/src/metabase/api/segment.clj
index b41d14542fa8526173fcb2c9c6c90f8f085f8249..2a5ec6a6d243ea3c0d571082b339680c07619881 100644
--- a/src/metabase/api/segment.clj
+++ b/src/metabase/api/segment.clj
@@ -63,7 +63,7 @@
 (api/defendpoint-schema GET "/"
   "Fetch *all* `Segments`."
   []
-  (as-> (db/select Segment, :archived false, {:order-by [[:%lower.name :asc]]}) segments
+  (as-> (t2/select Segment, :archived false, {:order-by [[:%lower.name :asc]]}) segments
     (filter mi/can-read? segments)
     (hydrate segments :creator)
     (add-query-descriptions segments)))
diff --git a/src/metabase/api/table.clj b/src/metabase/api/table.clj
index 2393bc286744509696f985c05563aafd42e617db..3837625142747929d7d31ca35b44da58ab4597f0 100644
--- a/src/metabase/api/table.clj
+++ b/src/metabase/api/table.clj
@@ -41,7 +41,7 @@
 (api/defendpoint GET "/"
   "Get all `Tables`."
   []
-  (as-> (db/select Table, :active true, {:order-by [[:name :asc]]}) tables
+  (as-> (t2/select Table, :active true, {:order-by [[:name :asc]]}) tables
     (hydrate tables :db)
     (filterv mi/can-read? tables)))
 
@@ -89,7 +89,7 @@
 
 (defn- update-tables!
   [ids {:keys [visibility_type] :as body}]
-  (let [existing-tables (db/select Table :id [:in ids])]
+  (let [existing-tables (t2/select Table :id [:in ids])]
     (api/check-404 (= (count existing-tables) (count ids)))
     (run! api/write-check existing-tables)
     (let [updated-tables (db/transaction (mapv #(update-table!* % body) existing-tables))
@@ -325,7 +325,7 @@
   [card-id database-id metadata]
   (let [add-field-dimension-options #(assoc-field-dimension-options (driver.u/database->driver database-id) %)
         underlying (m/index-by :id (when-let [ids (seq (keep :id metadata))]
-                                     (db/select Field :id [:in ids])))
+                                     (t2/select Field :id [:in ids])))
         fields (for [{col-id :id :as col} metadata]
                  (-> col
                      (update :base_type keyword)
@@ -415,7 +415,7 @@
   {id ms/PositiveInt}
   (api/read-check Table id)
   (when-let [field-ids (seq (t2/select-pks-set Field, :table_id id, :visibility_type [:not= "retired"], :active true))]
-    (for [origin-field (db/select Field, :fk_target_field_id [:in field-ids], :active true)]
+    (for [origin-field (t2/select Field, :fk_target_field_id [:in field-ids], :active true)]
       ;; it's silly to be hydrating some of these tables/dbs
       {:relationship   :Mt1
        :origin_id      (:id origin-field)
diff --git a/src/metabase/api/timeline.clj b/src/metabase/api/timeline.clj
index 1868bfeac095fbb1eab7a1d94afe054cf6c10c8a..9c20813ab6be676073c1cbf4bbaeeaf5efb67221 100644
--- a/src/metabase/api/timeline.clj
+++ b/src/metabase/api/timeline.clj
@@ -47,7 +47,7 @@
   {include  (s/maybe Include)
    archived (s/maybe su/BooleanString)}
   (let [archived? (Boolean/parseBoolean archived)
-        timelines (->> (db/select Timeline
+        timelines (->> (t2/select Timeline
                          {:where    [:and
                                      [:= :archived archived?]
                                      (collection/visible-collection-ids->honeysql-filter-clause
diff --git a/src/metabase/api/user.clj b/src/metabase/api/user.clj
index 17c4d7fa95ff7c28531b353ead9e231d36095a71..a23efee4b580cc134e5286e96d50ad9bb1fb8a90 100644
--- a/src/metabase/api/user.clj
+++ b/src/metabase/api/user.clj
@@ -161,7 +161,7 @@
   (when (or status include_deactivated)
     (validation/check-group-manager))
   (let [include_deactivated (Boolean/parseBoolean include_deactivated)]
-    {:data   (cond-> (db/select
+    {:data   (cond-> (t2/select
                       (vec (cons User (user-visible-columns)))
                       (cond-> (user-clauses status query group_id include_deactivated)
                         (some? group_id) (sql.helpers/order-by [:core_user.is_superuser :desc] [:is_group_manager :desc])
diff --git a/src/metabase/automagic_dashboards/core.clj b/src/metabase/automagic_dashboards/core.clj
index 819f14d2ccbea59d54e90444cde573e93539b2b8..80eadb158e4a8f0c1ffb0fd94623c2f8e11bae76 100644
--- a/src/metabase/automagic_dashboards/core.clj
+++ b/src/metabase/automagic_dashboards/core.clj
@@ -39,7 +39,6 @@
    [metabase.util.schema :as su]
    [ring.util.codec :as codec]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (def ^:private public-endpoint "/auto/dashboard/")
@@ -726,7 +725,7 @@
    be returned."
   [table]
   (for [{:keys [id target]} (field/with-targets
-                              (db/select Field
+                              (t2/select Field
                                 :table_id           (u/the-id table)
                                 :fk_target_field_id [:not= nil]
                                 :active             true))
@@ -778,7 +777,7 @@
   [{:keys [source _entity] :as _root} tables]
   (let [engine (source->engine source)]
     (if (mi/instance-of? Table source)
-      (comp (->> (db/select Field
+      (comp (->> (t2/select Field
                    :table_id [:in (map u/the-id tables)]
                    :visibility_type "normal"
                    :preview_display true
@@ -1388,7 +1387,7 @@
   ([database] (candidate-tables database nil))
   ([database schema]
    (let [rules (rules/get-rules ["table"])]
-     (->> (apply db/select [Table :id :schema :display_name :entity_type :db_id]
+     (->> (apply t2/select [Table :id :schema :display_name :entity_type :db_id]
                  (cond-> [:db_id           (u/the-id database)
                           :visibility_type nil
                           :active          true]
diff --git a/src/metabase/automagic_dashboards/filters.clj b/src/metabase/automagic_dashboards/filters.clj
index 72186dfff5a2d0f09875966b7e6c3bdbea652358..6bc2744e7fb949a0fbc0882a3107f3e978631794 100644
--- a/src/metabase/automagic_dashboards/filters.clj
+++ b/src/metabase/automagic_dashboards/filters.clj
@@ -8,7 +8,7 @@
    [metabase.util.date-2 :as u.date]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]))
+   [toucan2.core :as t2]))
 
 (def ^{:arglists '([form])} field-reference?
   "Is given form an MBQL field reference?"
@@ -140,7 +140,7 @@
   ([dashboard dimensions max-filters]
    (let [fks (when-let [table-ids (not-empty (set (keep (comp :table_id :card)
                                                         (:ordered_cards dashboard))))]
-               (->> (db/select Field :fk_target_field_id [:not= nil]
+               (->> (t2/select Field :fk_target_field_id [:not= nil]
                                :table_id [:in table-ids])
                     field/with-targets))]
      (->> dimensions
diff --git a/src/metabase/db/util.clj b/src/metabase/db/util.clj
index c6719ff27175b12948be59b0dfe0bad95f321d42..8c9044e62a7e668da93dd7adc8151d7265b4eb9d 100644
--- a/src/metabase/db/util.clj
+++ b/src/metabase/db/util.clj
@@ -32,15 +32,15 @@
   "Convenience for generating an HoneySQL `IN` clause for a keyword and all of its descendents.
    Intended for use with the type hierarchy in `metabase.types`.
 
-     (db/select Field :semantic_type (mdb/isa :type/URL))
+     (t2/select Field :semantic_type (mdb/isa :type/URL))
       ->
-     (db/select Field :semantic_type [:in #{\"type/URL\" \"type/ImageURL\" \"type/AvatarURL\"}])
+     (t2/select Field :semantic_type [:in #{\"type/URL\" \"type/ImageURL\" \"type/AvatarURL\"}])
 
    Also accepts optional `expr` for use directly in a HoneySQL `where`:
 
-     (db/select Field {:where (mdb/isa :semantic_type :type/URL)})
+     (t2/select Field {:where (mdb/isa :semantic_type :type/URL)})
      ->
-     (db/select Field {:where [:in :semantic_type #{\"type/URL\" \"type/ImageURL\" \"type/AvatarURL\"}]})"
+     (t2/select Field {:where [:in :semantic_type #{\"type/URL\" \"type/ImageURL\" \"type/AvatarURL\"}]})"
   ([type-keyword]
    [:in (type-keyword->descendants type-keyword)])
   ;; when using this with an `expr` (e.g. `(isa :semantic_type :type/URL)`) just go ahead and take the results of the
diff --git a/src/metabase/driver.clj b/src/metabase/driver.clj
index e81911b351908189e0160fe6d6325a1ad4fe8181..7f60823bd1feb63d903f46877f3e8784624aa1cc 100644
--- a/src/metabase/driver.clj
+++ b/src/metabase/driver.clj
@@ -15,7 +15,7 @@
    [metabase.util.i18n :refer [deferred-tru trs tru]]
    [metabase.util.log :as log]
    [potemkin :as p]
-   [toucan.db :as db]))
+   [toucan2.core :as t2]))
 
 (set! *warn-on-reflection* true)
 
@@ -29,7 +29,7 @@
   `nil` (meaning subsequent queries will not attempt to change the session timezone) or something considered invalid
   by a given Database (meaning subsequent queries will fail to change the session timezone)."
   []
-  (doseq [{driver :engine, id :id, :as database} (db/select 'Database)]
+  (doseq [{driver :engine, id :id, :as database} (t2/select 'Database)]
     (try
       (notify-database-updated driver database)
       (catch Throwable e
diff --git a/src/metabase/driver/sql_jdbc/actions.clj b/src/metabase/driver/sql_jdbc/actions.clj
index 6fbbe4fbeaec4980a4a06fb4e91b3195a280fd98..7907ecf8849adc265012ccef744a957ff62712ef 100644
--- a/src/metabase/driver/sql_jdbc/actions.clj
+++ b/src/metabase/driver/sql_jdbc/actions.clj
@@ -21,7 +21,6 @@
    [metabase.util.i18n :refer [trs tru]]
    [metabase.util.log :as log]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2])
   (:import
    (java.sql Connection PreparedStatement)))
@@ -77,7 +76,7 @@
         column->field  (actions/cached-value
                         [::cast-values table-id]
                         (fn []
-                          (m/index-by :name (db/select Field :table_id table-id))))]
+                          (m/index-by :name (t2/select Field :table_id table-id))))]
     (m/map-kv-vals (fn [col-name value]
                      (let [col-name                         (u/qualified-name col-name)
                            {base-type :base_type :as field} (get column->field col-name)]
diff --git a/src/metabase/models/action.clj b/src/metabase/models/action.clj
index 68c849172928ec203f38397c5d0b938631dc0a0a..bbf808df89ba9bcdc0737b61d1bee91384e8fd16 100644
--- a/src/metabase/models/action.clj
+++ b/src/metabase/models/action.clj
@@ -141,14 +141,14 @@
 
 (defn- normalize-query-actions [actions]
   (when (seq actions)
-    (let [query-actions (db/select QueryAction :action_id [:in (map :id actions)])
+    (let [query-actions (t2/select QueryAction :action_id [:in (map :id actions)])
           action-id->query-actions (m/index-by :action_id query-actions)]
       (for [action actions]
         (merge action (-> action :id action-id->query-actions (dissoc :action_id)))))))
 
 (defn- normalize-http-actions [actions]
   (when (seq actions)
-    (let [http-actions (db/select HTTPAction :action_id [:in (map :id actions)])
+    (let [http-actions (t2/select HTTPAction :action_id [:in (map :id actions)])
           http-actions-by-action-id (m/index-by :action_id http-actions)]
       (map (fn [action]
              (let [http-action (get http-actions-by-action-id (:id action))]
@@ -161,7 +161,7 @@
 
 (defn- normalize-implicit-actions [actions]
   (when (seq actions)
-    (let [implicit-actions (db/select ImplicitAction :action_id [:in (map :id actions)])
+    (let [implicit-actions (t2/select ImplicitAction :action_id [:in (map :id actions)])
           implicit-actions-by-action-id (m/index-by :action_id implicit-actions)]
       (map (fn [action]
              (let [implicit-action (get implicit-actions-by-action-id (:id action))]
@@ -172,9 +172,9 @@
 (defn- select-actions-without-implicit-params
   "Select Actions and fill in sub type information. Don't use this if you need implicit parameters
    for implicit actions, use [[select-action]] instead.
-   `options` is passed to `db/select` `& options` arg."
+   `options` is passed to `t2/select` `& options` arg."
   [& options]
-  (let [{:keys [query http implicit]} (group-by :type (apply db/select Action options))
+  (let [{:keys [query http implicit]} (group-by :type (apply t2/select Action options))
         query-actions                 (normalize-query-actions query)
         http-actions                  (normalize-http-actions http)
         implicit-actions              (normalize-implicit-actions implicit)]
@@ -194,7 +194,7 @@
                                      :when table-id]
                                  [table-id card]))
         tables (when-let [table-ids (seq (keys card-by-table-id))]
-                 (hydrate (db/select 'Table :id [:in table-ids]) :fields))]
+                 (hydrate (t2/select 'Table :id [:in table-ids]) :fields))]
     (into {}
           (for [table tables
                 :let [fields (:fields table)]
@@ -235,7 +235,7 @@
                                              (filter #(contains? implicit-action-model-ids (:id %)))
                                              distinct)
                                         (when (seq implicit-action-model-ids)
-                                          (db/select 'Card :id [:in implicit-action-model-ids])))
+                                          (t2/select 'Card :id [:in implicit-action-model-ids])))
         model-id->db-id               (into {} (for [card implicit-action-models]
                                                  [(:id card) (:database_id card)]))
         model-id->implicit-parameters (when (seq implicit-action-models)
@@ -269,7 +269,7 @@
 
 (defn select-action
   "Selects an Action and fills in the subtype data and implicit parameters.
-   `options` is passed to `db/select-one` `& options` arg."
+   `options` is passed to `t2/select-one` `& options` arg."
   [& options]
   (first (apply select-actions nil options)))
 
diff --git a/src/metabase/models/card.clj b/src/metabase/models/card.clj
index d12e9c538c9a1eee7bbb29d3bc889ba47e0e6a2d..c8e465a4c3789f0b0d6499de3b56f678c4901f3f 100644
--- a/src/metabase/models/card.clj
+++ b/src/metabase/models/card.clj
@@ -282,7 +282,7 @@
   - card is archived
   - card.result_metadata changes and the parameter values source field can't be found anymore"
   [{id :id, :as changes}]
-  (let [parameter-cards   (db/select ParameterCard :card_id id)]
+  (let [parameter-cards   (t2/select ParameterCard :card_id id)]
     (doseq [[[po-type po-id] param-cards]
             (group-by (juxt :parameterized_object_type :parameterized_object_id) parameter-cards)]
       (let [model                  (case po-type :card 'Card :dashboard 'Dashboard)
diff --git a/src/metabase/models/collection.clj b/src/metabase/models/collection.clj
index 94b01babc218be594e64ca3d6034d198b1c7becf..ed414b9b7a1f1a02c4542b4c744ec009f0f664bc 100644
--- a/src/metabase/models/collection.clj
+++ b/src/metabase/models/collection.clj
@@ -278,7 +278,7 @@
 
   Guaranteed to always generate a valid HoneySQL form, so this can be used directly in a query without further checks.
 
-    (db/select Card
+    (t2/select Card
       {:where (collection/visible-collection-ids->honeysql-filter-clause
                (collection/permissions-set->visible-collection-ids
                 @*current-user-permissions-set*))})"
@@ -361,7 +361,7 @@
 (s/defn ^:private ancestors* :- [(mi/InstanceOf Collection)]
   [{:keys [location]}]
   (when-let [ancestor-ids (seq (location-path->ids location))]
-    (db/select [Collection :name :id :personal_owner_id]
+    (t2/select [Collection :name :id :personal_owner_id]
       :id [:in ancestor-ids]
       {:order-by [:location]})))
 
@@ -416,7 +416,7 @@
      (children-location collection) ; -> \"/10/20/30/\";
 
      ;; To get children of this collection:
-     (db/select Collection :location \"/10/20/30/\")"
+     (t2/select Collection :location \"/10/20/30/\")"
   [{:keys [location], :as collection} :- CollectionWithLocationAndIDOrRoot]
   (if (collection.root/is-root-collection? collection)
     "/"
@@ -444,7 +444,7 @@
   [collection :- CollectionWithLocationAndIDOrRoot, & additional-honeysql-where-clauses]
   ;; first, fetch all the descendants of the `collection`, and build a map of location -> children. This will be used
   ;; so we can fetch the immediate children of each Collection
-  (let [location->children (group-by :location (db/select [Collection :name :id :location :description]
+  (let [location->children (group-by :location (t2/select [Collection :name :id :location :description]
                                                  {:where
                                                   (apply
                                                    vector
@@ -523,7 +523,7 @@
 
 (s/defn ^:private effective-children* :- #{(mi/InstanceOf Collection)}
   [collection :- CollectionWithLocationAndIDOrRoot & additional-honeysql-where-clauses]
-  (set (db/select [Collection :id :name :description]
+  (set (t2/select [Collection :id :name :description]
                   {:where (apply effective-children-where-clause collection additional-honeysql-where-clauses)})))
 
 (mi/define-simple-hydration-method effective-children
diff --git a/src/metabase/models/collection/graph.clj b/src/metabase/models/collection/graph.clj
index df6105b4a46f7b8b216ca32026a3eb7d415b4a3b..0b273cef8884841d0947a2d7ab19fd93069d55cf 100644
--- a/src/metabase/models/collection/graph.clj
+++ b/src/metabase/models/collection/graph.clj
@@ -39,7 +39,7 @@
 ;;; -------------------------------------------------- Fetch Graph ---------------------------------------------------
 
 (defn- group-id->permissions-set []
-  (into {} (for [[group-id perms] (group-by :group_id (db/select Permissions))]
+  (into {} (for [[group-id perms] (group-by :group_id (t2/select Permissions))]
              {group-id (set (map :object perms))})))
 
 (s/defn ^:private perms-type-for-collection :- CollectionPermissions
diff --git a/src/metabase/models/dashboard.clj b/src/metabase/models/dashboard.clj
index c4e15a435aa28caa6e2068d59c48f1eb1e409ed5..6d197bb87884e38e4a9649bd7b1c7210ef39a789 100644
--- a/src/metabase/models/dashboard.clj
+++ b/src/metabase/models/dashboard.clj
@@ -179,7 +179,7 @@
   ;; Now update the cards as needed
   (let [serialized-cards    (:cards serialized-dashboard)
         id->serialized-card (zipmap (map :id serialized-cards) serialized-cards)
-        current-cards       (db/select [DashboardCard :size_x :size_y :row :col :id :card_id :dashboard_id]
+        current-cards       (t2/select [DashboardCard :size_x :size_y :row :col :id :card_id :dashboard_id]
                                        :dashboard_id dashboard-id)
         id->current-card    (zipmap (map :id current-cards) current-cards)
         all-dashcard-ids    (concat (map :id serialized-cards)
@@ -481,7 +481,7 @@
   (let [dashboard ((get-method serdes/load-one! :default) (dissoc ingested :ordered_cards) maybe-local)]
     (doseq [dashcard (:ordered_cards ingested)]
       (serdes/load-one! (dashcard-for dashcard dashboard)
-                             (t2/select-one 'DashboardCard :entity_id (:entity_id dashcard))))))
+                        (t2/select-one 'DashboardCard :entity_id (:entity_id dashcard))))))
 
 (defn- serdes-deps-dashcard
   [{:keys [card_id parameter_mappings visualization_settings]}]
@@ -498,7 +498,7 @@
        (set/union (serdes/parameters-deps parameters))))
 
 (defmethod serdes/descendants "Dashboard" [_model-name id]
-  (let [dashcards (db/select ['DashboardCard :card_id :action_id :parameter_mappings]
+  (let [dashcards (t2/select ['DashboardCard :card_id :action_id :parameter_mappings]
                              :dashboard_id id)
         dashboard (t2/select-one Dashboard :id id)]
     (set/union
diff --git a/src/metabase/models/dashboard_card.clj b/src/metabase/models/dashboard_card.clj
index 1c55f5237ac9b4c4e18c8ba3dec29669db4c4eb1..b09f64add65fa9b63bffffc8acb1a48c5f580457 100644
--- a/src/metabase/models/dashboard_card.clj
+++ b/src/metabase/models/dashboard_card.clj
@@ -97,10 +97,11 @@
   :series
   "Return the `Cards` associated as additional series on this DashboardCard."
   [{:keys [id]}]
-  (db/select [Card :id :name :description :display :dataset_query :visualization_settings :collection_id]
-    (mdb.u/join [Card :id] [DashboardCardSeries :card_id])
-    (db/qualify DashboardCardSeries :dashboardcard_id) id
-    {:order-by [[(db/qualify DashboardCardSeries :position) :asc]]}))
+  (t2/select [Card :id :name :description :display :dataset_query :visualization_settings :collection_id]
+             (merge
+               (mdb.u/join [Card :id] [DashboardCardSeries :card_id])
+               {:order-by [[(db/qualify DashboardCardSeries :position) :asc]]
+                :where    [:= (db/qualify DashboardCardSeries :dashboardcard_id) id]})))
 
 
 ;;; ---------------------------------------------------- CRUD FNS ----------------------------------------------------
@@ -168,7 +169,7 @@
   (into {}
         (filter (fn [[k v]]
                   (not= v (get old k)))
-        new)))
+         new)))
 
 (s/defn update-dashboard-card!
   "Updates an existing DashboardCard including all DashboardCardSeries.
diff --git a/src/metabase/models/database.clj b/src/metabase/models/database.clj
index f2ea41e638d49596e71c9f53196a4c3664a4d5cf..fef7bd0efad874744816ff23ca5a68eb5e142ebe 100644
--- a/src/metabase/models/database.clj
+++ b/src/metabase/models/database.clj
@@ -247,14 +247,14 @@
   "Return the `Tables` associated with this `Database`."
   [{:keys [id]}]
   ;; TODO - do we want to include tables that should be `:hidden`?
-  (db/select 'Table, :db_id id, :active true, {:order-by [[:%lower.display_name :asc]]}))
+  (t2/select 'Table, :db_id id, :active true, {:order-by [[:%lower.display_name :asc]]}))
 
 (defn pk-fields
   "Return all the primary key `Fields` associated with this `database`."
   [{:keys [id]}]
   (let [table-ids (t2/select-pks-set 'Table, :db_id id, :active true)]
     (when (seq table-ids)
-      (db/select 'Field, :table_id [:in table-ids], :semantic_type (mdb.u/isa :type/PK)))))
+      (t2/select 'Field, :table_id [:in table-ids], :semantic_type (mdb.u/isa :type/PK)))))
 
 
 ;;; -------------------------------------------------- JSON Encoder --------------------------------------------------
diff --git a/src/metabase/models/field.clj b/src/metabase/models/field.clj
index 12974df68d3bf146a97ca33d0524014505393f22..2a8ddbc03bf752ea7463c392a578d22ecb57573f 100644
--- a/src/metabase/models/field.clj
+++ b/src/metabase/models/field.clj
@@ -207,7 +207,7 @@
 (defn values
   "Return the `FieldValues` associated with this `field`."
   [{:keys [id]}]
-  (db/select [FieldValues :field_id :values], :field_id id))
+  (t2/select [FieldValues :field_id :values], :field_id id))
 
 (defn- select-field-id->instance
   "Select instances of `model` related by `field_id` FK to a Field in `fields`, and return a map of Field ID -> model
@@ -221,7 +221,7 @@
   [fields model & conditions]
   (let [field-ids (set (map :id fields))]
     (m/index-by :field_id (when (seq field-ids)
-                            (apply db/select model :field_id [:in field-ids] conditions)))))
+                            (apply t2/select model :field_id [:in field-ids] conditions)))))
 
 (mi/define-batched-hydration-method with-values
   :values
@@ -320,7 +320,7 @@
                                                (:fk_target_field_id field))]
                                 (:fk_target_field_id field)))
         id->target-field (m/index-by :id (when (seq target-field-ids)
-                                           (readable-fields-only (db/select Field :id [:in target-field-ids]))))]
+                                           (readable-fields-only (t2/select Field :id [:in target-field-ids]))))]
     (for [field fields
           :let  [target-id (:fk_target_field_id field)]]
       (assoc field :target (id->target-field target-id)))))
@@ -389,7 +389,7 @@
   name)
 
 (defmethod serdes/extract-query "Field" [_model-name _opts]
-  (let [dimensions (->> (db/select Dimension)
+  (let [dimensions (->> (t2/select Dimension)
                         (group-by :field_id))]
     (eduction (map #(assoc % :dimensions (get dimensions (:id %))))
               (db/select-reducible Field))))
@@ -419,7 +419,7 @@
   [_model-name _opts field]
   (let [field (if (contains? field :dimensions)
                 field
-                (assoc field :dimensions (db/select Dimension :field_id (:id field))))]
+                (assoc field :dimensions (t2/select Dimension :field_id (:id field))))]
     (-> (serdes/extract-one-basics "Field" field)
         (update :dimensions         extract-dimensions)
         (update :table_id           serdes/export-table-fk)
diff --git a/src/metabase/models/field_values.clj b/src/metabase/models/field_values.clj
index 33feee7cb82f8176c63ca1bdbf8470d5548a2575..12a4abb24690115dc551be5d6c6acf0d1510cb8d 100644
--- a/src/metabase/models/field_values.clj
+++ b/src/metabase/models/field_values.clj
@@ -434,7 +434,7 @@
   [field-ids]
   (let [fields (when (seq field-ids)
                  (filter field-should-have-field-values?
-                         (db/select ['Field :name :id :base_type :effective_type :coercion_strategy
+                         (t2/select ['Field :name :id :base_type :effective_type :coercion_strategy
                                      :semantic_type :visibility_type :table_id :has_field_values]
                            :id [:in field-ids])))
         table-id->is-on-demand? (table-ids->table-id->is-on-demand? (map :table_id fields))]
diff --git a/src/metabase/models/login_history.clj b/src/metabase/models/login_history.clj
index 0392d1da3488d6ab82da84de788460fc1b70f917..2e3e61b12ce8a1e737daacda304caa82749d73ff 100644
--- a/src/metabase/models/login_history.clj
+++ b/src/metabase/models/login_history.clj
@@ -8,9 +8,9 @@
    [metabase.util.date-2 :as u.date]
    [metabase.util.i18n :as i18n :refer [trs tru]]
    [metabase.util.log :as log]
-   [toucan.db :as db]
    [toucan.models :as models]
-   [toucan2.connection :as t2.conn]))
+   [toucan2.connection :as t2.conn]
+   [toucan2.core :as t2]))
 
 (set! *warn-on-reflection* true)
 
@@ -59,12 +59,12 @@
     true                                  (dissoc :session_id)))
 
 (defn- first-login-ever? [{user-id :user_id}]
-  (some-> (db/select [LoginHistory :id] :user_id user-id {:limit 2})
+  (some-> (t2/select [LoginHistory :id] :user_id user-id {:limit 2})
           count
           (= 1)))
 
 (defn- first-login-on-this-device? [{user-id :user_id, device-id :device_id}]
-  (some-> (db/select [LoginHistory :id] :user_id user-id, :device_id device-id, {:limit 2})
+  (some-> (t2/select [LoginHistory :id] :user_id user-id, :device_id device-id, {:limit 2})
           count
           (= 1)))
 
diff --git a/src/metabase/models/params.clj b/src/metabase/models/params.clj
index 0fbae9de3d3cfe61a8490faab47666e3280800cd..3e2d437067faa747a6a6c95e2f069b290e8c20b4 100644
--- a/src/metabase/models/params.clj
+++ b/src/metabase/models/params.clj
@@ -23,7 +23,6 @@
    [metabase.util.log :as log]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan.hydrate :refer [hydrate]]
    [toucan2.core :as t2]))
 
@@ -96,12 +95,12 @@
   (filter #(isa? (:semantic_type %) :type/PK) fields))
 
 (def ^:private Field:params-columns-only
-  "Form for use in Toucan `db/select` expressions (as a drop-in replacement for using `Field`) that returns Fields with
+  "Form for use in Toucan `t2/select` expressions (as a drop-in replacement for using `Field`) that returns Fields with
   only the columns that are appropriate for returning in public/embedded API endpoints, which make heavy use of the
   functions in this namespace. Use `conj` to add additional Fields beyond the ones already here. Use `rest` to get
   just the column identifiers, perhaps for use with something like `select-keys`. Clutch!
 
-    (db/select Field:params-columns-only)"
+    (t2/select Field:params-columns-only)"
   ['Field :id :table_id :display_name :base_type :semantic_type :has_field_values])
 
 (defn- fields->table-id->name-field
@@ -109,7 +108,7 @@
   cases where more than one name Field exists for a Table, this just adds the first one it finds."
   [fields]
   (when-let [table-ids (seq (map :table_id fields))]
-    (m/index-by :table_id (-> (db/select Field:params-columns-only
+    (m/index-by :table_id (-> (t2/select Field:params-columns-only
                                 :table_id      [:in table-ids]
                                 :semantic_type (mdb.u/isa :type/Name))
                               ;; run `metabase.models.field/infer-has-field-values` on these Fields so their values of
@@ -155,7 +154,7 @@
   parameter widgets."
   [field-ids :- (s/maybe #{su/IntGreaterThanZero})]
   (when (seq field-ids)
-    (m/index-by :id (-> (db/select Field:params-columns-only :id [:in field-ids])
+    (m/index-by :id (-> (t2/select Field:params-columns-only :id [:in field-ids])
                         (hydrate :has_field_values :name_field [:dimensions :human_readable_field])
                         remove-dimensions-nonpublic-columns))))
 
diff --git a/src/metabase/models/permissions.clj b/src/metabase/models/permissions.clj
index 2dfc3e4fd011c61acd411965b7cbf19b76f72ab5..91a7629f48f719c1e94bb19c6dfdd0b843b6803a 100644
--- a/src/metabase/models/permissions.clj
+++ b/src/metabase/models/permissions.clj
@@ -834,7 +834,7 @@
              db-ids)))
 
 (defn- permissions-by-group-ids [where-clause]
-  (let [permissions (db/select [Permissions [:group_id :group-id] [:object :path]]
+  (let [permissions (t2/select [Permissions [:group_id :group-id] [:object :path]]
                       {:where where-clause})]
     (reduce (fn [m {:keys [group-id path]}]
               (update m group-id conj path))
diff --git a/src/metabase/models/permissions_group.clj b/src/metabase/models/permissions_group.clj
index 7207d63eef1eaa6b5248e562495cfa3ca62c56d4..7010034edc1f8b97d43fa80eb0999ee4355eaa77 100644
--- a/src/metabase/models/permissions_group.clj
+++ b/src/metabase/models/permissions_group.clj
@@ -133,4 +133,4 @@
 (defn non-admin-groups
   "Return a set of the IDs of all `PermissionsGroups`, aside from the admin group."
   []
-  (db/select PermissionsGroup :name [:not= admin-group-name]))
+  (t2/select PermissionsGroup :name [:not= admin-group-name]))
diff --git a/src/metabase/models/persisted_info.clj b/src/metabase/models/persisted_info.clj
index 79e4f21e6232e5988811953f757f9cfd741baf06..bfa8b36a0a7b73a2e9d810c0b4bd720e409232fb 100644
--- a/src/metabase/models/persisted_info.clj
+++ b/src/metabase/models/persisted_info.clj
@@ -113,7 +113,7 @@
 (defn ready-unpersisted-models!
   "Looks for all new models in database and creates a persisted-info ready to be synced."
   [database-id]
-  (let [cards (db/select Card {:where [:and
+  (let [cards (t2/select Card {:where [:and
                                        [:= :database_id database-id]
                                        [:= :dataset true]
                                        [:not [:exists {:select [1]
diff --git a/src/metabase/models/pulse.clj b/src/metabase/models/pulse.clj
index 843ae9e63da448b18c061d8f94c28f66533d350c..9b483d2dc0e75daacc6c5222ec6c7b5a96330e62 100644
--- a/src/metabase/models/pulse.clj
+++ b/src/metabase/models/pulse.clj
@@ -218,7 +218,7 @@
   :channels
   "Return the PulseChannels associated with this `notification`."
   [notification-or-id]
-  (db/select PulseChannel, :pulse_id (u/the-id notification-or-id)))
+  (t2/select PulseChannel, :pulse_id (u/the-id notification-or-id)))
 
 (s/defn ^:private cards* :- [HybridPulseCard]
   [notification-or-id]
@@ -263,7 +263,7 @@
   [notification :- (mi/InstanceOf Pulse)]
   (dissoc notification :alert_condition :alert_above_goal :alert_first_only))
 
-;; TODO - do we really need this function? Why can't we just use `db/select` and `hydrate` like we do for everything
+;; TODO - do we really need this function? Why can't we just use `t2/select` and `hydrate` like we do for everything
 ;; else?
 (s/defn retrieve-pulse :- (s/maybe (mi/InstanceOf Pulse))
   "Fetch a single *Pulse*, and hydrate it with a set of 'standard' hydrations; remove Alert columns, since this is a
@@ -465,7 +465,7 @@
    * All previously existing channels will be updated with their most recent information."
   [notification-or-id channels :- [su/Map]]
   (let [new-channels   (group-by (comp keyword :channel_type) channels)
-        old-channels   (group-by (comp keyword :channel_type) (db/select PulseChannel
+        old-channels   (group-by (comp keyword :channel_type) (t2/select PulseChannel
                                                                 :pulse_id (u/the-id notification-or-id)))
         handle-channel #(create-update-delete-channel! (u/the-id notification-or-id)
                                                        (first (get new-channels %))
@@ -519,7 +519,7 @@
 
 (s/defn ^:private notification-or-id->existing-card-refs :- [CardRef]
   [notification-or-id]
-  (db/select [PulseCard [:card_id :id] :include_csv :include_xls :dashboard_card_id]
+  (t2/select [PulseCard [:card_id :id] :include_csv :include_xls :dashboard_card_id]
     :pulse_id (u/the-id notification-or-id)
     {:order-by [[:position :asc]]}))
 
diff --git a/src/metabase/models/pulse_channel.clj b/src/metabase/models/pulse_channel.clj
index 5bc9cd1f4463f3ca956a4d4e7ef26dc4c0895ef1..e0da165c37569c04b7013da884951f227a1adafc 100644
--- a/src/metabase/models/pulse_channel.clj
+++ b/src/metabase/models/pulse_channel.clj
@@ -247,7 +247,7 @@
                                       :else                "invalid")
         monthly-schedule-day-or-nil (when (= :other monthday)
                                       weekday)]
-    (db/select [PulseChannel :id :pulse_id :schedule_type :channel_type]
+    (t2/select [PulseChannel :id :pulse_id :schedule_type :channel_type]
       {:where [:and [:= :enabled true]
                [:or [:= :schedule_type "hourly"]
                 [:and [:= :schedule_type "daily"]
diff --git a/src/metabase/models/revision.clj b/src/metabase/models/revision.clj
index c053aaaf223885cb4d0d5a68ec9bac5770093013..d9965aa2eb84e0e901829da5ab572c2d628d96a2 100644
--- a/src/metabase/models/revision.clj
+++ b/src/metabase/models/revision.clj
@@ -98,7 +98,7 @@
   "Get the revisions for `model` with `id` in reverse chronological order."
   [model id]
   {:pre [(models/model? model) (integer? id)]}
-  (db/select Revision, :model (name model), :model_id id, {:order-by [[:id :desc]]}))
+  (t2/select Revision, :model (name model), :model_id id, {:order-by [[:id :desc]]}))
 
 (defn revisions+details
   "Fetch `revisions` for `model` with `id` and add details."
@@ -114,7 +114,7 @@
   "Delete old revisions of `model` with `id` when there are more than `max-revisions` in the DB."
   [model id]
   {:pre [(models/model? model) (integer? id)]}
-  (when-let [old-revisions (seq (drop max-revisions (map :id (db/select [Revision :id]
+  (when-let [old-revisions (seq (drop max-revisions (map :id (t2/select [Revision :id]
                                                                :model    (name model)
                                                                :model_id id
                                                                {:order-by [[:timestamp :desc]]}))))]
diff --git a/src/metabase/models/serialization.clj b/src/metabase/models/serialization.clj
index 0207f2185580434b94919f3248a33e6567712734..7c82a9ea912f51cba36457bd02b7ca69aa265338 100644
--- a/src/metabase/models/serialization.clj
+++ b/src/metabase/models/serialization.clj
@@ -137,7 +137,7 @@
 
   Returns a reducible stream of modeled Toucan maps.
 
-  Defaults to using `(toucan.db/select model)` for the entire table.
+  Defaults to using `(toucan.t2/select model)` for the entire table.
 
   You may want to override this to eg. skip archived entities, or otherwise filter what gets serialized."
   {:arglists '([model-name opts])}
@@ -417,7 +417,7 @@
   "Creates the basic context for storage. This is a map with a single entry: `:collections` is a map from collection ID
   to the path of collections."
   []
-  (let [colls      (db/select ['Collection :id :entity_id :location :slug])
+  (let [colls      (t2/select ['Collection :id :entity_id :location :slug])
         coll-names (into {} (for [{:keys [id entity_id slug]} colls]
                               [(str id) (storage-leaf-file-name entity_id slug)]))
         coll->path (into {} (for [{:keys [entity_id id location]} colls
diff --git a/src/metabase/models/table.clj b/src/metabase/models/table.clj
index 25797dab20c16dc9cc14388fe637225e4ebf6f84..8d8fb52660cde817ebf5303a2e14df859b8af56e 100644
--- a/src/metabase/models/table.clj
+++ b/src/metabase/models/table.clj
@@ -13,7 +13,6 @@
    [metabase.models.segment :refer [Segment]]
    [metabase.models.serialization :as serdes]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan.models :as models]
    [toucan2.core :as t2]))
 
@@ -96,7 +95,7 @@
    (map-indexed (fn [new-position field]
                   (t2/update! Field (u/the-id field) {:position new-position}))
                 ;; Can't use `select-field` as that returns a set while we need an ordered list
-                (db/select [Field :id]
+                (t2/select [Field :id]
                            :table_id  (u/the-id table)
                            {:order-by (case (:field_order table)
                                         :custom       [[:custom_position :asc]]
@@ -136,7 +135,7 @@
   :fields
   "Return the Fields belonging to a single `table`."
   [{:keys [id]}]
-  (db/select Field
+  (t2/select Field
     :table_id        id
     :active          true
     :visibility_type [:not= "retired"]
@@ -175,7 +174,7 @@
   [tables]
   (with-objects :segments
     (fn [table-ids]
-      (db/select Segment :table_id [:in table-ids], :archived false, {:order-by [[:name :asc]]}))
+      (t2/select Segment :table_id [:in table-ids], :archived false, {:order-by [[:name :asc]]}))
     tables))
 
 (mi/define-batched-hydration-method with-metrics
@@ -184,7 +183,7 @@
   [tables]
   (with-objects :metrics
     (fn [table-ids]
-      (db/select Metric :table_id [:in table-ids], :archived false, {:order-by [[:name :asc]]}))
+      (t2/select Metric :table_id [:in table-ids], :archived false, {:order-by [[:name :asc]]}))
     tables))
 
 (defn with-fields
@@ -192,7 +191,7 @@
   [tables]
   (with-objects :fields
     (fn [table-ids]
-      (db/select Field
+      (t2/select Field
         :active          true
         :table_id        [:in table-ids]
         :visibility_type [:not= "retired"]
diff --git a/src/metabase/models/task_history.clj b/src/metabase/models/task_history.clj
index eb5bcb154a7ae6f208bbb534e8a2944f4a9feba3..cbd277be925203880f610ed67ab3807be2df58b2 100644
--- a/src/metabase/models/task_history.clj
+++ b/src/metabase/models/task_history.clj
@@ -106,7 +106,7 @@
   "Return all TaskHistory entries, applying `limit` and `offset` if not nil"
   [limit  :- (s/maybe su/IntGreaterThanZero)
    offset :- (s/maybe su/IntGreaterThanOrEqualToZero)]
-  (db/select TaskHistory (merge {:order-by [[:ended_at :desc]]}
+  (t2/select TaskHistory (merge {:order-by [[:ended_at :desc]]}
                                 (when limit
                                   {:limit limit})
                                 (when offset
diff --git a/src/metabase/models/timeline.clj b/src/metabase/models/timeline.clj
index 3a5b2e574093c1d9a084803423be6480ba5f974e..4fdd41323edfa8875ef2cd11bf969f11e12a97f3 100644
--- a/src/metabase/models/timeline.clj
+++ b/src/metabase/models/timeline.clj
@@ -8,7 +8,6 @@
    [metabase.models.timeline-event :as timeline-event]
    [metabase.util.date-2 :as u.date]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan.hydrate :refer [hydrate]]
    [toucan.models :as models]
    [toucan2.core :as t2]))
@@ -45,7 +44,7 @@
   "Load timelines based on `collection-id` passed in (nil means the root collection). Hydrates the events on each
   timeline at `:events` on the timeline."
   [collection-id {:keys [:timeline/events? :timeline/archived?] :as options}]
-  (cond-> (hydrate (db/select Timeline
+  (cond-> (hydrate (t2/select Timeline
                               :collection_id collection-id
                               :archived (boolean archived?))
                    :creator
diff --git a/src/metabase/models/timeline_event.clj b/src/metabase/models/timeline_event.clj
index 5c8a38fd2c77f3e6fa66c466327360cfedd66907..def3cc723a835d4d1231c640255e0b0abf580c53 100644
--- a/src/metabase/models/timeline_event.clj
+++ b/src/metabase/models/timeline_event.clj
@@ -5,7 +5,6 @@
    [metabase.util.date-2 :as u.date]
    [metabase.util.honey-sql-2 :as h2x]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan.hydrate :refer [hydrate]]
    [toucan.models :as models]
    [toucan2.core :as t2]))
@@ -68,7 +67,7 @@
                               [:<= (h2x/->date start) (h2x/->date :timestamp)])
                             (when end
                               [:<= (h2x/->date :timestamp) (h2x/->date end)])]])]}]
-    (hydrate (db/select TimelineEvent clause) :creator)))
+    (hydrate (t2/select TimelineEvent clause) :creator)))
 
 (defn include-events
   "Include events on `timelines` passed in. Options are optional and include whether to return unarchived events or all
diff --git a/src/metabase/models/user.clj b/src/metabase/models/user.clj
index 025394f782a531dcb1597a91ccfa14c0d7701aac..506e3897b27ba2d723cdd529b98a75bdf90f7336 100644
--- a/src/metabase/models/user.clj
+++ b/src/metabase/models/user.clj
@@ -191,7 +191,7 @@
     (let [selector (cond-> [PermissionsGroupMembership [:group_id :id]]
                      (premium-features/enable-advanced-permissions?)
                      (conj :is_group_manager))]
-      (db/select selector :user_id (u/the-id user-or-id)))))
+      (t2/select selector :user_id (u/the-id user-or-id)))))
 
 ;;; -------------------------------------------------- Permissions ---------------------------------------------------
 
@@ -217,7 +217,7 @@
   In which `is_group_manager` is only added when `advanced-permissions` is enabled."
   [users]
   (when (seq users)
-    (let [user-id->memberships (group-by :user_id (db/select [PermissionsGroupMembership :user_id [:group_id :id] :is_group_manager]
+    (let [user-id->memberships (group-by :user_id (t2/select [PermissionsGroupMembership :user_id [:group_id :id] :is_group_manager]
                                                              :user_id [:in (set (map u/the-id users))]))
           membership->group    (fn [membership]
                                  (select-keys membership
@@ -232,7 +232,7 @@
   TODO: deprecate :group_ids and use :user_group_memberships instead"
   [users]
   (when (seq users)
-    (let [user-id->memberships (group-by :user_id (db/select [PermissionsGroupMembership :user_id :group_id]
+    (let [user-id->memberships (group-by :user_id (t2/select [PermissionsGroupMembership :user_id :group_id]
                                                     :user_id [:in (set (map u/the-id users))]))]
       (for [user users]
         (assoc user :group_ids (set (map :group_id (user-id->memberships (u/the-id user)))))))))
diff --git a/src/metabase/moderation.clj b/src/metabase/moderation.clj
index 4bbfecae6c6664ed62e0effac3a006cd85070c73..a81479aed8cef196c741ba4ef5f79b6feb684e26 100644
--- a/src/metabase/moderation.clj
+++ b/src/metabase/moderation.clj
@@ -4,7 +4,6 @@
    [metabase.models.interface :as mi]
    [metabase.util :as u]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (def moderated-item-types
@@ -12,7 +11,7 @@
   (s/enum "card" "dashboard" :card :dashboard))
 
 (def moderated-item-type->model
-  "Maps DB name of the moderated item type to the model symbol (used for db/select and such)"
+  "Maps DB name of the moderated item type to the model symbol (used for t2/select and such)"
   {"card"      'Card
    :card       'Card
    "dashboard" 'Dashboard
@@ -37,7 +36,7 @@
     (let [item-ids    (not-empty (keep :id items))
           all-reviews (when item-ids
                         (group-by (juxt :moderated_item_type :moderated_item_id)
-                                  (db/select 'ModerationReview
+                                  (t2/select 'ModerationReview
                                              :moderated_item_type "card"
                                              :moderated_item_id [:in item-ids]
                                              {:order-by [[:id :desc]]})))]
@@ -53,7 +52,7 @@
   [moderation-reviews]
   (when (seq moderation-reviews)
     (let [id->user (m/index-by :id
-                               (db/select 'User :id [:in (map :moderator_id moderation-reviews)]))]
+                               (t2/select 'User :id [:in (map :moderator_id moderation-reviews)]))]
       (for [mr moderation-reviews]
         (assoc mr :user (get id->user (:moderator_id mr)))))))
 
diff --git a/src/metabase/pulse.clj b/src/metabase/pulse.clj
index 799640f58c2e506444b0896b8faa1bfcc9ea5c47..88bc66874323c3725306302353cc1bb8775b17de 100644
--- a/src/metabase/pulse.clj
+++ b/src/metabase/pulse.clj
@@ -33,7 +33,6 @@
    [metabase.util.ui-logic :as ui-logic]
    [metabase.util.urls :as urls]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2])
   (:import
    (clojure.lang ExceptionInfo)))
@@ -170,7 +169,7 @@
   The gerenerated contents will follow the pulse's creator permissions."
   [{pulse-creator-id :creator_id, :as pulse} dashboard & {:as _options}]
   (let [dashboard-id      (u/the-id dashboard)
-        dashcards         (db/select DashboardCard :dashboard_id dashboard-id)
+        dashcards         (t2/select DashboardCard :dashboard_id dashboard-id)
         ordered-dashcards (sort dashcard-comparator dashcards)]
     (mw.session/with-current-user pulse-creator-id
       (doall (for [dashcard ordered-dashcards
diff --git a/src/metabase/query_processor/middleware/add_dimension_projections.clj b/src/metabase/query_processor/middleware/add_dimension_projections.clj
index 4bdb49a35f40622443dcc5cea7aea659db026d98..32d867fff025cfedf3e3daa508075cbb6dd8f2f2 100644
--- a/src/metabase/query_processor/middleware/add_dimension_projections.clj
+++ b/src/metabase/query_processor/middleware/add_dimension_projections.clj
@@ -35,8 +35,8 @@
    [metabase.util.log :as log]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]
-   [toucan.hydrate :refer [hydrate]]))
+   [toucan.hydrate :refer [hydrate]]
+   [toucan2.core :as t2]))
 
 (def ^:private ExternalRemappingDimensionInitialInfo
   "External remapping dimensions when they're first fetched from the app DB. We'll add extra info to this."
@@ -60,7 +60,7 @@
   [fields :- [mbql.s/Field]]
   (when-let [field-ids (not-empty (set (mbql.u/match fields [:field (id :guard integer?) _] id)))]
     (letfn [(thunk []
-              (m/index-by :field_id (db/select [Dimension :id :field_id :name :human_readable_field_id]
+              (m/index-by :field_id (t2/select [Dimension :id :field_id :name :human_readable_field_id]
                                       :field_id [:in field-ids]
                                       :type     "external")))]
       (if (qp.store/initialized?)
diff --git a/src/metabase/query_processor/middleware/add_implicit_clauses.clj b/src/metabase/query_processor/middleware/add_implicit_clauses.clj
index ce4b1e236e8fedebcfc4215daae54dc47f4cd0cc..69b56981c1ca7ef9e276e6e0de05d5a2e5cbf5a6 100644
--- a/src/metabase/query_processor/middleware/add_implicit_clauses.clj
+++ b/src/metabase/query_processor/middleware/add_implicit_clauses.clj
@@ -14,7 +14,7 @@
    [metabase.util.log :as log]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]))
+   [toucan2.core :as t2]))
 
 ;;; +----------------------------------------------------------------------------------------------------------------+
 ;;; |                                              Add Implicit Fields                                               |
@@ -22,7 +22,7 @@
 
 (defn- table->sorted-fields*
   [table-id]
-  (db/select [Field :id :base_type :effective_type :coercion_strategy :semantic_type]
+  (t2/select [Field :id :base_type :effective_type :coercion_strategy :semantic_type]
     :table_id        table-id
     :active          true
     :visibility_type [:not-in ["sensitive" "retired"]]
diff --git a/src/metabase/query_processor/middleware/auto_bucket_datetimes.clj b/src/metabase/query_processor/middleware/auto_bucket_datetimes.clj
index 1ce4659de9f6f0c89366b5950a75bd6036f51bf1..bb95cd0d6e4f8739e32c452244d1340042c561db 100644
--- a/src/metabase/query_processor/middleware/auto_bucket_datetimes.clj
+++ b/src/metabase/query_processor/middleware/auto_bucket_datetimes.clj
@@ -12,7 +12,7 @@
    [metabase.models.field :refer [Field]]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]))
+   [toucan2.core :as t2]))
 
 (def ^:private FieldTypeInfo
   {:base-type                      (s/maybe su/FieldType)
@@ -38,7 +38,7 @@
    ;; build map of field ID -> <info from DB>
    (when-let [field-ids (seq (filter integer? (map second unbucketed-fields)))]
      (into {} (for [{id :id, :as field}
-                    (db/select [Field :id :base_type :effective_type :semantic_type]
+                    (t2/select [Field :id :base_type :effective_type :semantic_type]
                       :id [:in (set field-ids)])]
                 [id (set/rename-keys (select-keys field
                                                   [:base_type :effective_type :semantic_type])
diff --git a/src/metabase/query_processor/middleware/expand_macros.clj b/src/metabase/query_processor/middleware/expand_macros.clj
index 666f668c55b368b85cc03f0128f9e47e53c13a9d..0d295ae48a6732f668644dc6a51064e56190c050 100644
--- a/src/metabase/query_processor/middleware/expand_macros.clj
+++ b/src/metabase/query_processor/middleware/expand_macros.clj
@@ -17,7 +17,6 @@
    [metabase.util.log :as log]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 ;;; +----------------------------------------------------------------------------------------------------------------+
@@ -63,7 +62,7 @@
 (s/defn ^:private metric-clauses->id->info :- {su/IntGreaterThanZero MetricInfo}
   [metric-clauses :- [mbql.s/metric]]
   (when (seq metric-clauses)
-    (m/index-by :id (for [metric (db/select [Metric :id :name :definition] :id [:in (set (map second metric-clauses))])
+    (m/index-by :id (for [metric (t2/select [Metric :id :name :definition] :id [:in (set (map second metric-clauses))])
                           :let   [errors (u/prog1 (metric-info-validation-errors metric)
                                            (when <>
                                              (log/warn (trs "Invalid metric: {0} reason: {1}" metric <>))))]
diff --git a/src/metabase/query_processor/middleware/resolve_referenced.clj b/src/metabase/query_processor/middleware/resolve_referenced.clj
index f2974c35ba56d666970cb51ec5a9825d7ac84b2a..d9cd96b666f5b2151f2ac001446183e739fac176 100644
--- a/src/metabase/query_processor/middleware/resolve_referenced.clj
+++ b/src/metabase/query_processor/middleware/resolve_referenced.clj
@@ -11,7 +11,6 @@
     :as qp.u.tag-referenced-cards]
    [metabase.util.i18n :refer [tru]]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]
    [weavejester.dependency :as dep])
   (:import
@@ -46,7 +45,7 @@
 
 (defn- circular-ref-error
   [from-card to-card]
-  (let [[from-name to-name] (map :name (db/select [Card :name] :id [:in [from-card to-card]]))]
+  (let [[from-name to-name] (map :name (t2/select [Card :name] :id [:in [from-card to-card]]))]
     (str
      (tru "This query has circular referencing sub-queries. ")
      (tru "These questions seem to be part of the problem: \"{0}\" and \"{1}\"." from-name to-name))))
diff --git a/src/metabase/query_processor/store.clj b/src/metabase/query_processor/store.clj
index 2e12ae8a66e4edddeb10ba54348925e57f0bb60d..8ee4217ec9994f283c3b2fa314c063c77324d871 100644
--- a/src/metabase/query_processor/store.clj
+++ b/src/metabase/query_processor/store.clj
@@ -21,7 +21,6 @@
    [metabase.util.i18n :refer [tru]]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 ;;; ---------------------------------------------- Setting up the Store ----------------------------------------------
@@ -186,7 +185,7 @@
   [table-ids :- IDs]
   ;; remove any IDs for Tables that have already been fetched
   (when-let [ids-to-fetch (seq (remove (set (keys (:tables @*store*))) table-ids))]
-    (let [fetched-tables (db/select (into [Table] table-columns-to-fetch)
+    (let [fetched-tables (t2/select (into [Table] table-columns-to-fetch)
                            :id    [:in (set ids-to-fetch)]
                            :db_id (db-id))
           fetched-ids    (set (map :id fetched-tables))]
diff --git a/src/metabase/related.clj b/src/metabase/related.clj
index e01b5c437d02511a95eb5354882c5cd9d4ffda37..287388d12b0d957a30ee510805108102ffa7e340 100644
--- a/src/metabase/related.clj
+++ b/src/metabase/related.clj
@@ -17,7 +17,6 @@
    [metabase.models.table :refer [Table]]
    [metabase.query-processor.util :as qp.util]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (def ^:private ^Long max-best-matches        3)
@@ -105,13 +104,13 @@
 
 (defn- metrics-for-table
   [table]
-  (filter-visible (db/select Metric
+  (filter-visible (t2/select Metric
                     :table_id (:id table)
                     :archived false)))
 
 (defn- segments-for-table
   [table]
-  (filter-visible (db/select Segment
+  (filter-visible (t2/select Segment
                     :table_id (:id table)
                     :archived false)))
 
@@ -155,7 +154,7 @@
 
 (defn- similar-questions
   [card]
-  (->> (db/select Card
+  (->> (t2/select Card
          :table_id (:table_id card)
          :archived false)
        filter-visible
@@ -164,7 +163,7 @@
 
 (defn- canonical-metric
   [card]
-  (->> (db/select Metric
+  (->> (t2/select Metric
          :table_id (:table_id card)
          :archived false)
        filter-visible
@@ -178,14 +177,14 @@
                                                         :model     "Dashboard"
                                                         :user_id   api/*current-user-id*
                                                         {:order-by [[:timestamp :desc]]}))]
-    (->> (db/select Dashboard :id [:in dashboard-ids])
+    (->> (t2/select Dashboard :id [:in dashboard-ids])
          filter-visible
          (take max-serendipity-matches))))
 
 (defn- recommended-dashboards
   [cards]
   (let [recent                   (recently-modified-dashboards)
-        card-id->dashboard-cards (->> (apply db/select [DashboardCard :card_id :dashboard_id]
+        card-id->dashboard-cards (->> (apply t2/select [DashboardCard :card_id :dashboard_id]
                                              (cond-> []
                                                (seq cards)
                                                (concat [:card_id [:in (map :id cards)]])
@@ -198,7 +197,7 @@
                            (map :dashboard_id)
                            distinct)
         best          (when (seq dashboard-ids)
-                        (->> (db/select Dashboard :id [:in dashboard-ids])
+                        (->> (t2/select Dashboard :id [:in dashboard-ids])
                              filter-visible
                              (take max-best-matches)))]
     (concat best recent)))
@@ -274,7 +273,7 @@
      :metrics     (metrics-for-table table)
      :linking-to  linking-to
      :linked-from linked-from
-     :tables      (->> (db/select Table
+     :tables      (->> (t2/select Table
                          :db_id           (:db_id table)
                          :schema          (:schema table)
                          :id              [:not= (:id table)]
@@ -297,7 +296,7 @@
                     (rank-by-similarity field)
                     (filter (comp pos? :similarity))
                     interesting-mix)
-     :fields   (->> (db/select Field
+     :fields   (->> (t2/select Field
                       :table_id        (:id table)
                       :id              [:not= (:id field)]
                       :visibility_type "normal"
diff --git a/src/metabase/sync/analyze/classify.clj b/src/metabase/sync/analyze/classify.clj
index 2849fee279cb66420215f3b320c6db876902c587..97bd84ada9a8f8f7a404c39157fa10f41f8895d4 100644
--- a/src/metabase/sync/analyze/classify.clj
+++ b/src/metabase/sync/analyze/classify.clj
@@ -32,7 +32,6 @@
    [metabase.util :as u]
    [metabase.util.log :as log]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 ;;; +----------------------------------------------------------------------------------------------------------------+
@@ -114,7 +113,7 @@
   "Return a sequences of Fields belonging to `table` for which we should attempt to determine semantic type. This
   should include Fields that have the latest fingerprint, but have not yet *completed* analysis."
   [table :- i/TableInstance]
-  (seq (db/select Field
+  (seq (t2/select Field
          :table_id            (u/the-id table)
          :fingerprint_version i/latest-fingerprint-version
          :last_analyzed       nil)))
diff --git a/src/metabase/sync/analyze/fingerprint.clj b/src/metabase/sync/analyze/fingerprint.clj
index ae425ce551c90edca114098125a3ce5c812e8cbd..95ed76a68cc8e4b03218ad38f2ad4aef4c860784 100644
--- a/src/metabase/sync/analyze/fingerprint.clj
+++ b/src/metabase/sync/analyze/fingerprint.clj
@@ -20,7 +20,6 @@
    [metabase.util.schema :as su]
    [redux.core :as redux]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (comment
@@ -178,7 +177,7 @@
   "Return a sequences of Fields belonging to TABLE for which we should generate (and save) fingerprints.
    This should include NEW fields that are active and visible."
   [table :- i/TableInstance]
-  (seq (db/select Field
+  (seq (t2/select Field
          (honeysql-for-fields-that-need-fingerprint-updating table))))
 
 ;; TODO - `fingerprint-fields!` and `fingerprint-table!` should probably have their names switched
diff --git a/src/metabase/sync/field_values.clj b/src/metabase/sync/field_values.clj
index 884e4d0118e4dd2c20e12c320fa730ebe8745c87..7a09b886d3172a2ed5e652784e9a0c027284f818 100644
--- a/src/metabase/sync/field_values.clj
+++ b/src/metabase/sync/field_values.clj
@@ -46,7 +46,7 @@
 
 (defn- table->fields-to-scan
   [table]
-  (db/select Field :table_id (u/the-id table), :active true, :visibility_type "normal"))
+  (t2/select Field :table_id (u/the-id table), :active true, :visibility_type "normal"))
 
 (s/defn update-field-values-for-table!
   "Update the FieldValues for all Fields (as needed) for TABLE."
diff --git a/src/metabase/sync/sync_metadata/fields/fetch_metadata.clj b/src/metabase/sync/sync_metadata/fields/fetch_metadata.clj
index 023106fc63b2e58790f80161e91e68ee23db3991..f1a769b6134f3603a2d9ffaf7e79ff1ff2889e3d 100644
--- a/src/metabase/sync/sync_metadata/fields/fetch_metadata.clj
+++ b/src/metabase/sync/sync_metadata/fields/fetch_metadata.clj
@@ -14,7 +14,7 @@
    [metabase.sync.sync-metadata.fields.common :as common]
    [metabase.util :as u]
    [schema.core :as s]
-   [toucan.db :as db]))
+   [toucan2.core :as t2]))
 
 ;;; +----------------------------------------------------------------------------------------------------------------+
 ;;; |                                         FETCHING OUR CURRENT METADATA                                          |
@@ -68,7 +68,7 @@
 (s/defn ^:private table->fields :- [i/FieldInstance]
   "Fetch active Fields from the Metabase application database for a given `table`."
   [table :- i/TableInstance]
- (db/select [Field :name :database_type :base_type :effective_type :coercion_strategy :semantic_type
+ (t2/select [Field :name :database_type :base_type :effective_type :coercion_strategy :semantic_type
              :parent_id :id :description :database_position :nfc_path :database_is_auto_increment :database_required]
      :table_id  (u/the-id table)
      :active    true
diff --git a/src/metabase/sync/sync_metadata/fields/sync_instances.clj b/src/metabase/sync/sync_metadata/fields/sync_instances.clj
index 5c0290563388f6ba34f1e20effaaafa3857a25bf..4011127a5d36c0d1616f76fa9951728bb0ab861a 100644
--- a/src/metabase/sync/sync_metadata/fields/sync_instances.clj
+++ b/src/metabase/sync/sync_metadata/fields/sync_instances.clj
@@ -31,7 +31,7 @@
   exist."
   [table :- i/TableInstance, new-field-metadatas :- [i/TableMetadataField], parent-id :- common/ParentID]
   (when (seq new-field-metadatas)
-    (db/select     Field
+    (t2/select     Field
       :table_id    (u/the-id table)
       :%lower.name [:in (map common/canonical-name new-field-metadatas)]
       :parent_id   parent-id
@@ -89,7 +89,7 @@
           new-field-ids (insert-new-fields! table (remove reactivated? new-field-metadatas) parent-id)]
       ;; now return the newly created or reactivated Fields
       (when-let [new-and-updated-fields (seq (map u/the-id (concat fields-to-reactivate new-field-ids)))]
-        (db/select Field :id [:in new-and-updated-fields])))))
+        (t2/select Field :id [:in new-and-updated-fields])))))
 
 
 ;;; +----------------------------------------------------------------------------------------------------------------+
diff --git a/src/metabase/sync/sync_metadata/tables.clj b/src/metabase/sync/sync_metadata/tables.clj
index f2f0f2ac32abd0b434d79f4b0c463a2de51a3b6e..deea412c1777edeae761b4776f8ac17f1ba8032b 100644
--- a/src/metabase/sync/sync_metadata/tables.clj
+++ b/src/metabase/sync/sync_metadata/tables.clj
@@ -170,7 +170,7 @@
   "Return information about what Tables we have for this DB in the Metabase application DB."
   [database :- i/DatabaseInstance]
   (set (map (partial into {})
-            (db/select [Table :name :schema :description]
+            (t2/select [Table :name :schema :description]
               :db_id  (u/the-id database)
               :active true))))
 
diff --git a/src/metabase/sync/util.clj b/src/metabase/sync/util.clj
index 6ccbc8e07dba1569de86b7c9c38322ba6cf501b5..a16f3329ffadcb7b0675e5442745f4d92d4a2539 100644
--- a/src/metabase/sync/util.clj
+++ b/src/metabase/sync/util.clj
@@ -290,7 +290,7 @@
 (defn db->sync-tables
   "Return all the Tables that should go through the sync processes for `database-or-id`."
   [database-or-id]
-  (db/select Table, :db_id (u/the-id database-or-id), :active true, :visibility_type nil))
+  (t2/select Table, :db_id (u/the-id database-or-id), :active true, :visibility_type nil))
 
 (defmulti name-for-logging
   "Return an appropriate string for logging an object in sync logging messages. Should be something like
diff --git a/src/metabase/task/persist_refresh.clj b/src/metabase/task/persist_refresh.clj
index f02dbf271400db234097b2db64ca3387c19eaa88..7a8a0391e80dd1b42a31ca1ab7445efbb81e5482 100644
--- a/src/metabase/task/persist_refresh.clj
+++ b/src/metabase/task/persist_refresh.clj
@@ -110,7 +110,7 @@
     (when (= task-type "persist-refresh")
       (when-let [error-details (seq (:error-details task-details))]
         (let [error-details-by-id (m/index-by :persisted-info-id error-details)
-              persisted-infos (->> (hydrate (db/select PersistedInfo :id [:in (keys error-details-by-id)])
+              persisted-infos (->> (hydrate (t2/select PersistedInfo :id [:in (keys error-details-by-id)])
                                             [:card :collection] :database)
                                    (map #(assoc % :error (get-in error-details-by-id [(:id %) :error]))))]
           (messages/send-persistent-model-error-email!
@@ -129,7 +129,7 @@
   "Seam for tests to pass in specific deletables to drop."
   [refresher deletables]
   (when (seq deletables)
-    (let [db-id->db    (m/index-by :id (db/select Database :id [:in (map :database_id deletables)]))
+    (let [db-id->db    (m/index-by :id (t2/select Database :id [:in (map :database_id deletables)]))
           unpersist-fn (fn []
                          (reduce (fn [stats persisted-info]
                                    ;; Since this could be long running, double check state just before deleting
@@ -420,7 +420,7 @@
   "Reschedule refresh for all enabled databases. Removes all existing triggers, and schedules refresh for databases with
   `:persist-models-enabled` in the options at interval [[public-settings/persisted-model-refresh-cron-schedule]]."
   []
-  (let [dbs-with-persistence (filter (comp :persist-models-enabled :options) (db/select Database))
+  (let [dbs-with-persistence (filter (comp :persist-models-enabled :options) (t2/select Database))
         cron-schedule        (public-settings/persisted-model-refresh-cron-schedule)]
     (unschedule-all-refresh-triggers! refresh-job-key)
     (doseq [db dbs-with-persistence]
diff --git a/src/metabase/transforms/core.clj b/src/metabase/transforms/core.clj
index 49ed3bff54b8113fda063a2c0d7c363d8db9bfcc..22e1033d4e906369132cb0be709372617bce664d 100644
--- a/src/metabase/transforms/core.clj
+++ b/src/metabase/transforms/core.clj
@@ -19,7 +19,6 @@
    [metabase.util.i18n :refer [tru]]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (s/defn ^:private add-bindings :- Bindings
@@ -175,7 +174,7 @@
   [db-id :- su/IntGreaterThanZero, schema :- (s/maybe s/Str)]
   (table/with-fields
     (de/with-domain-entity
-      (db/select 'Table :db_id db-id :schema schema))))
+      (t2/select 'Table :db_id db-id :schema schema))))
 
 (s/defn apply-transform!
   "Apply transform defined by transform spec `spec` to schema `schema` in database `db-id`.
diff --git a/src/metabase/transforms/dashboard.clj b/src/metabase/transforms/dashboard.clj
index 69b1793921810109965bbcba4de2c80262be9f3d..572539c1602480fc363f46975de5ab39cf7f884e 100644
--- a/src/metabase/transforms/dashboard.clj
+++ b/src/metabase/transforms/dashboard.clj
@@ -7,7 +7,6 @@
    [metabase.transforms.materialize :as tf.materialize]
    [metabase.transforms.specs :refer [transform-specs]]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan2.core :as t2]
    [toucan2.realize :as t2.realize]))
 
@@ -64,7 +63,7 @@
   (let [transform-spec              (m/find-first (comp #{transform-name} :name) @transform-specs)
         {steps false provides true} (->> transform-name
                                          tf.materialize/get-collection
-                                         (db/select 'Card :collection_id)
+                                         (t2/select 'Card :collection_id)
                                          (group-by (comp some?
                                                          (-> transform-spec :provides set)
                                                          :name)))
diff --git a/src/metabase/troubleshooting.clj b/src/metabase/troubleshooting.clj
index 94f812ca676093b2cce9e63cc5e0ba9aa3293dc5..02cf58d6b755ff8b7afac3f53a4818fcbe11e00d 100644
--- a/src/metabase/troubleshooting.clj
+++ b/src/metabase/troubleshooting.clj
@@ -5,7 +5,6 @@
    [metabase.config :as config]
    [metabase.db :as mdb]
    [metabase.driver :as driver]
-   [toucan.db :as db]
    [toucan2.core :as t2])
   (:import
    (javax.management ObjectName)))
@@ -32,7 +31,7 @@
 (defn metabase-info
   "Make it easy for the user to tell us what they're using"
   []
-  {:databases                    (->> (db/select 'Database) (map :engine) distinct)
+  {:databases                    (->> (t2/select 'Database) (map :engine) distinct)
    :hosting-env                  (stats/environment-type)
    :application-database         (mdb/db-type)
    :application-database-details (t2/with-connection [^java.sql.Connection conn]
diff --git a/test/metabase/analytics/stats_test.clj b/test/metabase/analytics/stats_test.clj
index bfce9779514bf0f31310768852a8e8d75ebec4d0..22b2642f3c43d73133013e3faf77d778cccc43fe 100644
--- a/test/metabase/analytics/stats_test.clj
+++ b/test/metabase/analytics/stats_test.clj
@@ -14,8 +14,8 @@
    [metabase.util :as u]
    [metabase.util.schema :as su]
    [schema.core :as s]
-   [toucan.db :as db]
-   [toucan.util.test :as tt]))
+   [toucan.util.test :as tt]
+   [toucan2.core :as t2]))
 
 (use-fixtures :once (fixtures/initialize :db))
 
@@ -100,7 +100,7 @@
 (def ^:private large-histogram (partial #'stats/histogram #'stats/bin-large-number))
 
 (defn- old-execution-metrics []
-  (let [executions (db/select [QueryExecution :executor_id :running_time :error])]
+  (let [executions (t2/select [QueryExecution :executor_id :running_time :error])]
     {:executions     (count executions)
      :by_status      (frequencies (for [{error :error} executions]
                                     (if error
diff --git a/test/metabase/api/alert_test.clj b/test/metabase/api/alert_test.clj
index 396193eb55f4e7a9dff26abb0f1708d1cc2e2e56..3946ac5ae5238a312650a7897bbd180acf9625cb 100644
--- a/test/metabase/api/alert_test.clj
+++ b/test/metabase/api/alert_test.clj
@@ -113,7 +113,7 @@
       (grant-collection-perms-fn! (perms-group/all-users) collection)
       ;; Go ahead and put all the Cards for all of the Alerts in the temp Collection
       (when (seq alerts-or-ids)
-        (doseq [alert (db/select Pulse :id [:in (set (map u/the-id alerts-or-ids))])
+        (doseq [alert (t2/select Pulse :id [:in (set (map u/the-id alerts-or-ids))])
                 :let  [card (#'metabase.models.pulse/alert->card alert)]]
           (t2/update! Card (u/the-id card) {:collection_id (u/the-id collection)})))
       (f))))
diff --git a/test/metabase/api/card_test.clj b/test/metabase/api/card_test.clj
index 5dd676c73c93b24a4c16ac8ba54d0e35ca0e4676..c19331447629cc74b651ed803d950f3655a40329 100644
--- a/test/metabase/api/card_test.clj
+++ b/test/metabase/api/card_test.clj
@@ -1751,7 +1751,7 @@
   in."
   [cards-or-card-ids]
   (when (seq cards-or-card-ids)
-    (let [cards               (db/select [Card :collection_id] :id [:in (map u/the-id cards-or-card-ids)])
+    (let [cards               (t2/select [Card :collection_id] :id [:in (map u/the-id cards-or-card-ids)])
           collection-ids      (set (filter identity (map :collection_id cards)))
           collection-id->name (when (seq collection-ids)
                                 (t2/select-pk->fn :name Collection :id [:in collection-ids]))]
@@ -1813,7 +1813,7 @@
                 (-> card (hydrate [:moderation_reviews :moderator_details])
                     :moderation_reviews first :status #{"verified"} boolean))
               (reviews [card]
-                (db/select ModerationReview
+                (t2/select ModerationReview
                            :moderated_item_type "card"
                            :moderated_item_id (u/the-id card)
                            {:order-by [[:id :desc]]}))
diff --git a/test/metabase/api/collection_test.clj b/test/metabase/api/collection_test.clj
index 8999050f17ba31fab267e492d08e1f768f5be968..be1b36720d09c1e57f6c1db92bdecb22bba8c415 100644
--- a/test/metabase/api/collection_test.clj
+++ b/test/metabase/api/collection_test.clj
@@ -131,7 +131,7 @@
                                       crowbertos               (set (map :name (mt/user-http-request :crowberto :get 200 "collection")))
                                       crowbertos-with-excludes (set (map :name (mt/user-http-request :crowberto :get 200 "collection" :exclude-other-user-collections true)))
                                       luckys                   (set (map :name (mt/user-http-request :lucky :get 200 "collection")))]
-                                  (is (= (into (set (map :name (db/select Collection))) public-collections)
+                                  (is (= (into (set (map :name (t2/select Collection))) public-collections)
                                          crowbertos))
                                   (is (= (into public-collections #{"Crowberto Corv's Personal Collection" "Crowberto's Child Collection"})
                                          crowbertos-with-excludes))
diff --git a/test/metabase/api/dashboard_test.clj b/test/metabase/api/dashboard_test.clj
index 5a564c6987cafd17c3222d09ecaaaf62ad3b55bc..c3f18e31483fa79a6c012dbf906e55852b7b304c 100644
--- a/test/metabase/api/dashboard_test.clj
+++ b/test/metabase/api/dashboard_test.clj
@@ -867,10 +867,10 @@
                                             :collection_id (u/the-id dest-coll)})]
             (is (= (:collection_id resp) (u/the-id dest-coll))
                 "Dashboard should go into the destination collection")
-            (is (= 3 (count (db/select 'Card :collection_id (u/the-id source-coll)))))
-            (let [copied-cards (db/select 'Card :collection_id (u/the-id dest-coll))
-                  copied-db-cards (db/select 'DashboardCard :dashboard_id (u/the-id (:id resp)))
-                  source-db-cards (db/select 'DashboardCard :dashboard_id (u/the-id dashboard))]
+            (is (= 3 (count (t2/select 'Card :collection_id (u/the-id source-coll)))))
+            (let [copied-cards (t2/select 'Card :collection_id (u/the-id dest-coll))
+                  copied-db-cards (t2/select 'DashboardCard :dashboard_id (u/the-id (:id resp)))
+                  source-db-cards (t2/select 'DashboardCard :dashboard_id (u/the-id dashboard))]
               (testing "Copies all of the questions on the dashboard"
                 (is (= 2 (count copied-cards))))
               (testing "Copies all of the dashboard cards"
@@ -946,8 +946,8 @@
                                               :collection_id (u/the-id dest-coll)})]
               (is (= (:collection_id resp) (u/the-id dest-coll))
                   "Dashboard should go into the destination collection")
-              (let [copied-cards (db/select 'Card :collection_id (u/the-id dest-coll))
-                    copied-db-cards (db/select 'DashboardCard :dashboard_id (u/the-id (:id resp)))]
+              (let [copied-cards (t2/select 'Card :collection_id (u/the-id dest-coll))
+                    copied-db-cards (t2/select 'DashboardCard :dashboard_id (u/the-id (:id resp)))]
                 (testing "Copies only one of the questions on the dashboard"
                   (is (= 1 (count copied-cards))))
                 (testing "Copies one of the dashboard cards"
@@ -957,7 +957,7 @@
                          (into #{} (map :name) copied-cards))
                       "Should preserve the titles of the original cards"))
                 (testing "Should not create dashboardcardseries because the base card lacks permissions"
-                  (is (empty? (db/select DashboardCardSeries :card_id [:in (map :id copied-cards)]))))
+                  (is (empty? (t2/select DashboardCardSeries :card_id [:in (map :id copied-cards)]))))
                 (testing "Response includes uncopied cards"
                   ;; cards might be full cards or just a map {:id 1} due to permissions Any card with lack of
                   ;; permissions is just {:id 1}. Cards in a series which you have permissions for, but the base card
@@ -1019,7 +1019,7 @@
                                                :description "A new description"
                                                :is_deep_copy true
                                                :collection_id (u/the-id source-coll)})
-                  cards-in-coll (db/select 'Card :collection_id (u/the-id source-coll))]
+                  cards-in-coll (t2/select 'Card :collection_id (u/the-id source-coll))]
               ;; original 3 plust 3 duplicates
               (is (= 6 (count cards-in-coll)) "Not all cards were copied")
               (is (= (into #{} (comp (map :name)
@@ -1219,7 +1219,7 @@
                  :parameter_mappings     [{:parameter_id "abc", :card_id 123, :hash "abc", :target "foo"}]
                  :visualization_settings {}}]
                (map (partial into {})
-                    (db/select [DashboardCard :size_x :size_y :col :row :parameter_mappings :visualization_settings]
+                    (t2/select [DashboardCard :size_x :size_y :col :row :parameter_mappings :visualization_settings]
                       :dashboard_id dashboard-id))))))))
 
 (deftest new-dashboard-card-with-additional-series-test
@@ -1254,7 +1254,7 @@
                    :col    4
                    :row    4}]
                  (map (partial into {})
-                      (db/select [DashboardCard :size_x :size_y :col :row], :dashboard_id dashboard-id))))
+                      (t2/select [DashboardCard :size_x :size_y :col :row], :dashboard_id dashboard-id))))
           (is (= #{0}
                  (t2/select-fn-set :position DashboardCardSeries, :dashboardcard_id (:id dashboard-card)))))))))
 
@@ -1283,7 +1283,7 @@
                                                    :size_x             4
                                                    :size_y             4
                                                    :parameter_mappings mappings}))
-            :dashcards    (fn [] (db/select DashboardCard :dashboard_id dashboard-id))})))))
+            :dashcards    (fn [] (t2/select DashboardCard :dashboard_id dashboard-id))})))))
 
 (deftest add-card-parameter-mapping-permissions-test
   (testing "POST /api/dashboard/:id/cards"
@@ -1482,7 +1482,7 @@
           ;; Only action card should change
           (is (partial= [{:card_id model-id-2}
                          {:card_id model-id}]
-                        (db/select DashboardCard :dashboard_id dashboard-id {:order-by [:id]}))))))))
+                        (t2/select DashboardCard :dashboard_id dashboard-id {:order-by [:id]}))))))))
 
 ;;; +----------------------------------------------------------------------------------------------------------------+
 ;;; |                                        GET /api/dashboard/:id/revisions                                        |
diff --git a/test/metabase/api/database_test.clj b/test/metabase/api/database_test.clj
index 9e60c141ee842b9b2d6c9fa0f6b04cf02fe6884d..545f57a52428d1182dcc6aedd050633d329e2632 100644
--- a/test/metabase/api/database_test.clj
+++ b/test/metabase/api/database_test.clj
@@ -69,7 +69,7 @@
       (update :visibility_type #(when % (name %)))))
 
 (defn- expected-tables [db-or-id]
-  (map table-details (db/select Table
+  (map table-details (t2/select Table
                        :db_id (u/the-id db-or-id), :active true, :visibility_type nil
                        {:order-by [[:%lower.schema :asc] [:%lower.display_name :asc]]})))
 
diff --git a/test/metabase/api/notify_test.clj b/test/metabase/api/notify_test.clj
index a532c2b5f7a32853a2a288a9a379a7d491f1e015..f353041e28eee8dee66783d22994efeb023aa4c4 100644
--- a/test/metabase/api/notify_test.clj
+++ b/test/metabase/api/notify_test.clj
@@ -13,7 +13,7 @@
    [metabase.test :as mt]
    [metabase.test.fixtures :as fixtures]
    [metabase.util :as u]
-   [toucan.db :as db]))
+   [toucan2.core :as t2]))
 
 (use-fixtures :once (fixtures/initialize :db :web-server))
 
@@ -131,7 +131,7 @@
         (mt/with-temp* [Database [database {:engine :postgres, :details (assoc details :dbname db-name)}]]
           (let [spec     (sql-jdbc.conn/connection-details->spec :postgres details)
                 exec!    (fn [spec statements] (doseq [statement statements] (jdbc/execute! spec [statement])))
-                tableset #(set (map (fn [{:keys [schema name]}] (format "%s.%s" schema name)) (db/select 'Table :db_id (:id %))))
+                tableset #(set (map (fn [{:keys [schema name]}] (format "%s.%s" schema name)) (t2/select 'Table :db_id (:id %))))
                 post     (fn post-api
                            ([payload] (post-api payload 200))
                            ([payload expected-code]
diff --git a/test/metabase/api/timeline_test.clj b/test/metabase/api/timeline_test.clj
index 12b50227ce0a10f965b29ddd505bf5ca3de1349e..37539fb2b1a5897c2f135270089acad136c44311 100644
--- a/test/metabase/api/timeline_test.clj
+++ b/test/metabase/api/timeline_test.clj
@@ -12,7 +12,6 @@
    [metabase.server.middleware.util :as mw.util]
    [metabase.test :as mt]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (deftest auth-tests
@@ -182,14 +181,14 @@
           ;; update the timeline to be archived
           (mt/user-http-request :rasta :put 200 (str "timeline/" (u/the-id tl-b)) {:archived true})
           (is (true?
-               (->> (db/select TimelineEvent :timeline_id (u/the-id tl-b))
+               (->> (t2/select TimelineEvent :timeline_id (u/the-id tl-b))
                     (map :archived)
                     (every? true?)))))
         (testing "check that we un-archive all events in a timeline when the timeline is un-archived"
           ;; since we archived in the previous step, we unarchive the same timeline here.
           (mt/user-http-request :rasta :put 200 (str "timeline/" (u/the-id tl-b)) {:archived false})
           (is (true?
-               (->> (db/select TimelineEvent :timeline_id (u/the-id tl-b))
+               (->> (t2/select TimelineEvent :timeline_id (u/the-id tl-b))
                     (map :archived)
                     (every? false?)))))))))
 
diff --git a/test/metabase/automagic_dashboards/core_test.clj b/test/metabase/automagic_dashboards/core_test.clj
index 6075eb931f385185e84215442b51785b78371b96..6aa08bcf88d73c421256fdcb2fae78916306f249 100644
--- a/test/metabase/automagic_dashboards/core_test.clj
+++ b/test/metabase/automagic_dashboards/core_test.clj
@@ -85,7 +85,7 @@
   (mt/with-test-user :rasta
     (automagic-dashboards.test/with-dashboard-cleanup
       (doseq [[table cardinality] (map vector
-                                       (db/select Table :db_id (mt/id) {:order-by [[:id :asc]]})
+                                       (t2/select Table :db_id (mt/id) {:order-by [[:id :asc]]})
                                        [7 5 8 2])]
         (test-automagic-analysis table cardinality)))
 
@@ -108,7 +108,7 @@
 (deftest mass-field-test
     (mt/with-test-user :rasta
       (automagic-dashboards.test/with-dashboard-cleanup
-        (doseq [field (db/select Field
+        (doseq [field (t2/select Field
                                  :table_id [:in (t2/select-fn-set :id Table :db_id (mt/id))]
                                  :visibility_type "normal"
                                  {:order-by [[:id :asc]]})]
@@ -356,7 +356,7 @@
         ;; These can be matched against dimension definitions with simple 1-element vector table specs
         ;; Example: {:field_type [:type/CreationTimestamp]}
         ;; More context is needed (see below test) for two-element dimension definitions
-        (let [context    {:source {:fields (db/select Field :id [:in [(mt/id :people :created_at)
+        (let [context    {:source {:fields (t2/select Field :id [:in [(mt/id :people :created_at)
                                                                       (mt/id :people :latitude)
                                                                       (mt/id :orders :created_at)]])}}
               ;; Lifted from the GenericTable dimensions definition
diff --git a/test/metabase/db/schema_migrations_test.clj b/test/metabase/db/schema_migrations_test.clj
index dea842b99718e0afa4bb8699c58372a40a94247f..a6334d8dcbc47369648c26cbaf5960cb4d648d76 100644
--- a/test/metabase/db/schema_migrations_test.clj
+++ b/test/metabase/db/schema_migrations_test.clj
@@ -215,7 +215,7 @@
                 (into #{}
                       (map #(select-keys % [:base_type :effective_type :coercion_strategy
                                             :semantic_type :name]))
-                      (db/select Field :table_id table-id)))))))))
+                      (t2/select Field :table_id table-id)))))))))
 
 (defn app-db-column-types
   "Returns a map of all column names to their respective type names, for the given `table-name`, by using the JDBC
@@ -648,7 +648,7 @@
                                              :collection_id          nil})]
        (migrate!)
        (is (= nil
-              (:parameters (first (db/simple-select Card {:where [:= :id card-id]})))))))))
+              (:parameters (first (t2/select (t2/table-name Card) {:where [:= :id card-id]})))))))))
 
 (deftest add-parameter-mappings-to-cards-test
   (testing "Migration v44.00-024: Add parameter_mappings to cards"
@@ -673,7 +673,7 @@
                                      :collection_id          nil})]
         (migrate!)
         (is (= nil
-               (:parameter_mappings (first (db/simple-select Card {:where [:= :id card-id]})))))))))
+               (:parameter_mappings (first (t2/select (t2/table-name Card) {:where [:= :id card-id]})))))))))
 
 (deftest grant-all-users-root-snippets-collection-readwrite-perms-test
   (letfn [(perms-path [] "/collection/namespace/snippets/root/")
diff --git a/test/metabase/driver/mysql_test.clj b/test/metabase/driver/mysql_test.clj
index f59dd9e790a7d3e3d798b8bddb1786e2ba95a389..9dd574d3819d5b15287c55754c603d88b960dab3 100644
--- a/test/metabase/driver/mysql_test.clj
+++ b/test/metabase/driver/mysql_test.clj
@@ -33,7 +33,6 @@
    #_{:clj-kondo/ignore [:discouraged-namespace]}
    [metabase.util.honeysql-extensions :as hx]
    [metabase.util.log :as log]
-   [toucan.db :as db]
    [toucan.hydrate :refer [hydrate]]
    [toucan.util.test :as tt]
    [toucan2.core :as t2]))
@@ -127,7 +126,7 @@
 
 (defn- db->fields [db]
   (let [table-ids (t2/select-pks-set Table :db_id (u/the-id db))]
-    (set (map (partial into {}) (db/select [Field :name :base_type :semantic_type] :table_id [:in table-ids])))))
+    (set (map (partial into {}) (t2/select [Field :name :base_type :semantic_type] :table_id [:in table-ids])))))
 
 (deftest tiny-int-1-test
   (mt/test-driver :mysql
@@ -163,7 +162,7 @@
                  {:name "id", :base_type :type/Integer, :semantic_type :type/PK}}
                (db->fields (mt/db)))))
       (let [table  (t2/select-one Table :db_id (u/id (mt/db)))
-            fields (db/select Field :table_id (u/id table) :name "year_column")]
+            fields (t2/select Field :table_id (u/id table) :name "year_column")]
         (testing "Can select from this table"
           (is (= [[#t "2001-01-01"] [#t "2002-01-01"] [#t "1999-01-01"]]
                  (metadata-queries/table-rows-sample table fields (constantly conj)))))
@@ -353,7 +352,7 @@
                                  :base_type :type/Integer}
                                 {:name      "t"
                                  :base_type :type/Text}]}]
-                     (->> (hydrate (db/select Table :db_id (:id database) {:order-by [:name]}) :fields)
+                     (->> (hydrate (t2/select Table :db_id (:id database) {:order-by [:name]}) :fields)
                           (map table-fingerprint)))))))))))
 
 (deftest group-on-time-column-test
diff --git a/test/metabase/driver/postgres_test.clj b/test/metabase/driver/postgres_test.clj
index 8e0337d5634095fed78d42df8afeb1cbdf02ef5f..412e787361703842b79b367b747d30bb54490d79 100644
--- a/test/metabase/driver/postgres_test.clj
+++ b/test/metabase/driver/postgres_test.clj
@@ -34,7 +34,6 @@
    #_{:clj-kondo/ignore [:discouraged-namespace]}
    [metabase.util.honeysql-extensions :as hx]
    [metabase.util.log :as log]
-   [toucan.db :as db]
    [toucan2.core :as t2])
   (:import
    (java.sql DatabaseMetaData)))
@@ -310,7 +309,7 @@
             ;; now take a look at the Tables in the database related to the view. THERE SHOULD BE ONLY ONE!
             (is (= [{:name "angry_birds", :active true}]
                    (map (partial into {})
-                        (db/select [Table :name :active] :db_id (u/the-id database), :name "angry_birds"))))))))))
+                        (t2/select [Table :name :active] :db_id (u/the-id database), :name "angry_birds"))))))))))
 
 (deftest partitioned-table-test
   (mt/test-driver :postgres
@@ -835,7 +834,7 @@
                      {:name "type", :database_type "bird type", :base_type :type/PostgresEnum}
                      {:name "status", :database_type "bird_status", :base_type :type/PostgresEnum}}
                    (set (map (partial into {})
-                             (db/select [Field :name :database_type :base_type] :table_id table-id)))))))
+                             (t2/select [Field :name :database_type :base_type] :table_id table-id)))))))
 
         (testing "End-to-end check: make sure everything works as expected when we run an actual query"
           (let [table-id           (t2/select-one-pk Table :db_id (u/the-id db), :name "birds")
diff --git a/test/metabase/driver/sql_jdbc/sync/describe_database_test.clj b/test/metabase/driver/sql_jdbc/sync/describe_database_test.clj
index f9a8114f7568598a432670c143d1f7e8359c21ee..271566d8379c5999bc5600f9ea91eca57b3cee56 100644
--- a/test/metabase/driver/sql_jdbc/sync/describe_database_test.clj
+++ b/test/metabase/driver/sql_jdbc/sync/describe_database_test.clj
@@ -129,7 +129,7 @@
 (defn- sync-and-assert-filtered-tables [database assert-table-fn]
   (mt/with-temp Database [db-filtered database]
     (sync/sync-database! db-filtered {:scan :schema})
-    (let [tables (db/select Table :db_id (u/the-id db-filtered))]
+    (let [tables (t2/select Table :db_id (u/the-id db-filtered))]
       (doseq [table tables]
         (assert-table-fn table)))))
 
diff --git a/test/metabase/events/persisted_info_test.clj b/test/metabase/events/persisted_info_test.clj
index 5184d07822128ef520e5378720b46e10a26ba213..e746cb0334816bb8f2192b56df7c416f4a6be3e6 100644
--- a/test/metabase/events/persisted_info_test.clj
+++ b/test/metabase/events/persisted_info_test.clj
@@ -5,7 +5,6 @@
    [metabase.models :refer [Card Database PersistedInfo]]
    [metabase.test :as mt]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (deftest event-test
@@ -14,7 +13,7 @@
                     Card     [card {:database_id (u/the-id db)}]]
       (events.persisted-info/process-event {:topic :card-create
                                             :item  card})
-      (is (zero? (count (db/select PersistedInfo :card_id (u/the-id card)))))
+      (is (zero? (count (t2/select PersistedInfo :card_id (u/the-id card)))))
 
       (events.persisted-info/process-event {:topic :card-update
                                             :item (assoc card :dataset true)})
diff --git a/test/metabase/models/card_test.clj b/test/metabase/models/card_test.clj
index f95aedf4628e0b05449adb7def837a4f8c5c3401..533ae56e889d6702e2e0719a1591e2963883b3ef 100644
--- a/test/metabase/models/card_test.clj
+++ b/test/metabase/models/card_test.clj
@@ -449,7 +449,7 @@
                   :parameterized_object_type :card
                   :parameterized_object_id   card-id
                   :parameter_id              "_CATEGORY_NAME_"}]
-                (db/select 'ParameterCard :parameterized_object_type "card" :parameterized_object_id card-id)))
+                (t2/select 'ParameterCard :parameterized_object_type "card" :parameterized_object_id card-id)))
 
         (testing "update values_source_config.card_id will update ParameterCard"
           (t2/update! Card card-id {:parameters [(merge default-params
@@ -459,12 +459,12 @@
                     :parameterized_object_type :card
                     :parameterized_object_id   card-id
                     :parameter_id              "_CATEGORY_NAME_"}]
-                  (db/select 'ParameterCard :parameterized_object_type "card" :parameterized_object_id card-id))))
+                  (t2/select 'ParameterCard :parameterized_object_type "card" :parameterized_object_id card-id))))
 
         (testing "delete the card will delete ParameterCard"
           (t2/delete! Card :id card-id)
           (is (= []
-                 (db/select 'ParameterCard :parameterized_object_type "card" :parameterized_object_id card-id))))))
+                 (t2/select 'ParameterCard :parameterized_object_type "card" :parameterized_object_id card-id))))))
 
     (testing "Delete a card will delete any ParameterCard that linked to it"
       (tt/with-temp* [Card  [{source-card-id :id}]
@@ -485,10 +485,10 @@
                   :parameterized_object_type :card
                   :parameterized_object_id   card-id-2
                   :parameter_id              "_CATEGORY_NAME_"}]
-                (db/select 'ParameterCard :card_id source-card-id)))
+                (t2/select 'ParameterCard :card_id source-card-id)))
         (t2/delete! Card :id source-card-id)
         (is (= []
-               (db/select 'ParameterCard :card_id source-card-id)))))))
+               (t2/select 'ParameterCard :card_id source-card-id)))))))
 
 (deftest cleanup-parameter-on-card-changes-test
   (mt/dataset sample-dataset
@@ -520,7 +520,7 @@
                 :parameter_id              "param_2"
                 :parameterized_object_type :dashboard
                 :parameterized_object_id   (:id dashboard)}]
-              (db/select ParameterCard :card_id source-card-id)))
+              (t2/select ParameterCard :card_id source-card-id)))
       ;; update card with removing the products.category
       (testing "on update result_metadata"
         (t2/update! Card source-card-id
@@ -533,7 +533,7 @@
                     :parameter_id              "param_1"
                     :parameterized_object_type :card
                     :parameterized_object_id   (:id card)}]
-                  (db/select ParameterCard :card_id source-card-id))))
+                  (t2/select ParameterCard :card_id source-card-id))))
 
         (testing "update the dashboard parameter and remove values_config of dashboard"
           (is (=? [{:id   "param_2"
@@ -554,7 +554,7 @@
         (t2/update! Card source-card-id {:archived true})
 
         (testing "ParameterCard for card is removed"
-          (is (=? [] (db/select ParameterCard :card_id source-card-id))))
+          (is (=? [] (t2/select ParameterCard :card_id source-card-id))))
 
         (testing "update the dashboard parameter and remove values_config of card"
           (is (=? [{:id   "param_1"
@@ -613,4 +613,6 @@
       (is (= {:version 2
               :pie.show_legend true
               :pie.percent_visibility "inside"}
-             (:visualization_settings (db/simple-select-one Card {:where [:= :id card-id]})))))))
+             (-> (t2/select-one (t2/table-name Card) {:where [:= :id card-id]})
+                 :visualization_settings
+                 (json/parse-string keyword)))))))
diff --git a/test/metabase/models/collection_test.clj b/test/metabase/models/collection_test.clj
index 421500cdf49fd1a189bd82807fb4a12b99666d80..2c83c60a30df7f38110d74ce6975d73ef0788907 100644
--- a/test/metabase/models/collection_test.clj
+++ b/test/metabase/models/collection_test.clj
@@ -885,7 +885,7 @@
   [collections & additional-conditions]
   (apply
    merge-with combine
-   (for [collection (-> (apply db/select Collection, :id [:in (map u/the-id collections)], additional-conditions)
+   (for [collection (-> (apply t2/select Collection, :id [:in (map u/the-id collections)], additional-conditions)
                         format-collections)]
      (assoc-in {} (concat (filter seq (str/split (:location collection) #"/"))
                           [(:name collection)])
diff --git a/test/metabase/models/database_test.clj b/test/metabase/models/database_test.clj
index ac24e6cb6c2f6698f4aff922fd2e69c85e11efec..fcec620d0a1e68d89086e7c0e9079a0ae0b55b41 100644
--- a/test/metabase/models/database_test.clj
+++ b/test/metabase/models/database_test.clj
@@ -46,7 +46,7 @@
   (testing "After deleting a Database, no permissions for the DB should still exist"
     (mt/with-temp Database [{db-id :id}]
       (t2/delete! Database :id db-id)
-      (is (= [] (db/select Permissions :object [:like (str "%" (perms/data-perms-path db-id) "%")]))))))
+      (is (= [] (t2/select Permissions :object [:like (str "%" (perms/data-perms-path db-id) "%")]))))))
 
 (deftest tasks-test
   (testing "Sync tasks should get scheduled for a newly created Database"
diff --git a/test/metabase/models/params/chain_filter_test.clj b/test/metabase/models/params/chain_filter_test.clj
index e8460ea4e207474ebeae9d36980babbf436e6639..f7ce7b0dad0fb30977417a88a7e6351af75ee510 100644
--- a/test/metabase/models/params/chain_filter_test.clj
+++ b/test/metabase/models/params/chain_filter_test.clj
@@ -564,7 +564,7 @@
   (mt/with-model-cleanup [FieldValues]
     (let [field-id         (u/the-id field-or-field-id)
           has_field_values (t2/select-one-fn :has_field_values Field :id field-id)
-          fvs              (db/select FieldValues :field_id field-id)]
+          fvs              (t2/select FieldValues :field_id field-id)]
       ;; switch to "list" to prevent [[field-values/create-or-update-full-field-values!]]
       ;; from changing this to `nil` if the field is `auto-list` and exceeds threshholds
       (t2/update! Field field-id {:has_field_values "list"})
diff --git a/test/metabase/models/params_test.clj b/test/metabase/models/params_test.clj
index 6d53f0d98af0abecc7727c92a04775c7aa75a503..dc264fd3ab5a2f5991b40d05ba076b0cbb2979b4 100644
--- a/test/metabase/models/params_test.clj
+++ b/test/metabase/models/params_test.clj
@@ -38,7 +38,7 @@
                mt/derecordize))))
 
   (testing "make sure it works for multiple fields efficiently. Should only require one DB call to hydrate many Fields"
-    (let [venues-fields (db/select Field :table_id (mt/id :venues))]
+    (let [venues-fields (t2/select Field :table_id (mt/id :venues))]
       (db/with-call-counting [call-count]
         (hydrate venues-fields :name_field)
         (is (= 1
diff --git a/test/metabase/models/task_history_test.clj b/test/metabase/models/task_history_test.clj
index f1b7ee5e003db932f8e58666515addc1cba943be..5af86202ab94559fb71fa4ac4ec01681f962e2a0 100644
--- a/test/metabase/models/task_history_test.clj
+++ b/test/metabase/models/task_history_test.clj
@@ -55,7 +55,7 @@
         ;; Delete all but 2 task history rows
         (task-history/cleanup-task-history! 2)
         (is (= #{task-4 task-5}
-               (set (map :task (db/select TaskHistory)))))))))
+               (set (map :task (t2/select TaskHistory)))))))))
 
 (deftest no-op-test
   (testing "Basic cleanup test where no work needs to be done and nothing is deleted"
@@ -71,10 +71,10 @@
         (t2/delete! TaskHistory :id [:not-in (map u/the-id [t1 t2])])
         ;; We're keeping 100 rows, but there are only 2 present, so there should be no affect on running this
         (is (= #{task-1 task-2}
-               (set (map :task (db/select TaskHistory)))))
+               (set (map :task (t2/select TaskHistory)))))
         (task-history/cleanup-task-history! 100)
         (is (= #{task-1 task-2}
-               (set (map :task (db/select TaskHistory)))))))))
+               (set (map :task (t2/select TaskHistory)))))))))
 
 (defn- last-snowplow-event
   []
diff --git a/test/metabase/query_processor/middleware/add_implicit_clauses_test.clj b/test/metabase/query_processor/middleware/add_implicit_clauses_test.clj
index 8095fb48514b9b9a7fba807614d5ddfd38d96274..d839c95490569f92bb35642564c4585440deb842 100644
--- a/test/metabase/query_processor/middleware/add_implicit_clauses_test.clj
+++ b/test/metabase/query_processor/middleware/add_implicit_clauses_test.clj
@@ -13,13 +13,13 @@
    [metabase.test :as mt]
    [metabase.util :as u]
    [schema.core :as s]
-   [toucan.db :as db]))
+   [toucan2.core :as t2]))
 
 (deftest ordering-test
   (testing "check we fetch Fields in the right order"
     (mt/with-temp-vals-in-db Field (mt/id :venues :price) {:position -1}
       (let [ids       (map second (#'qp.add-implicit-clauses/sorted-implicit-fields-for-table (mt/id :venues)))
-            id->field (m/index-by :id (db/select [Field :id :position :name :semantic_type] :id [:in ids]))]
+            id->field (m/index-by :id (t2/select [Field :id :position :name :semantic_type] :id [:in ids]))]
         (is (= [ ;; sorted first because it has lowest positon
                 {:position -1, :name "PRICE", :semantic_type :type/Category}
                 ;; PK
diff --git a/test/metabase/query_processor_test/expressions_test.clj b/test/metabase/query_processor_test/expressions_test.clj
index 478153d7b9ead7c13a4a224ab1e75092e515a325..5559d72b6772914b0e6a18beeaa602025d49bc30 100644
--- a/test/metabase/query_processor_test/expressions_test.clj
+++ b/test/metabase/query_processor_test/expressions_test.clj
@@ -10,7 +10,8 @@
    [metabase.test :as mt]
    [metabase.util :as u]
    [metabase.util.date-2 :as u.date]
-   [toucan.db :as db]))
+   [toucan.db :as db]
+   [toucan2.core :as t2]))
 
 (deftest basic-test
   (mt/test-drivers (mt/normal-drivers-with-feature :expressions)
@@ -358,7 +359,7 @@
                                        [:field (mt/id :lots-of-fields :a) nil]
                                        [:field (mt/id :lots-of-fields :b) nil]]}
                      :fields      (into [[:expression "c"]]
-                                        (for [{:keys [id]} (db/select [Field :id]
+                                        (for [{:keys [id]} (t2/select [Field :id]
                                                              :table_id (mt/id :lots-of-fields)
                                                              :id       [:not-in #{(mt/id :lots-of-fields :a)
                                                                                   (mt/id :lots-of-fields :b)}]
diff --git a/test/metabase/sync/analyze_test.clj b/test/metabase/sync/analyze_test.clj
index 8a52e10b3472db5c7f74ad48a837241b51113697..5c34402213b5362bf5fda153a63658564c9ac726 100644
--- a/test/metabase/sync/analyze_test.clj
+++ b/test/metabase/sync/analyze_test.clj
@@ -39,7 +39,7 @@
         ;; PK is ok because it gets marked as part of metadata sync
         (is (= (zipmap ["CATEGORY_ID" "ID" "LATITUDE" "LONGITUDE" "NAME" "PRICE"]
                        (repeat {:semantic_type nil, :last_analyzed analysis-date}))
-               (into {} (for [field (db/select [Field :name :semantic_type :last_analyzed] :table_id (data/id :venues))]
+               (into {} (for [field (t2/select [Field :name :semantic_type :last_analyzed] :table_id (data/id :venues))]
                           [(:name field) (into {} (dissoc field :name))]))))))))
 
 ;; ...but they *SHOULD* get analyzed if they ARE newly created (expcept for PK which we skip)
@@ -57,7 +57,7 @@
              {:name "LONGITUDE", :semantic_type :type/Longitude, :last_analyzed true}
              {:name "CATEGORY_ID", :semantic_type :type/Category, :last_analyzed true}
              {:name "NAME", :semantic_type :type/Name, :last_analyzed true}}
-           (set (for [field (db/select [Field :name :semantic_type :last_analyzed] :table_id (u/the-id table))]
+           (set (for [field (t2/select [Field :name :semantic_type :last_analyzed] :table_id (u/the-id table))]
                   (into {} (update field :last_analyzed boolean))))))))
 
 (deftest mark-fields-as-analyzed-test
diff --git a/test/metabase/sync/sync_dynamic_test.clj b/test/metabase/sync/sync_dynamic_test.clj
index 97d89acb148fa000283bb9f79586a2c6929a4ef5..a91e314623bd90d2ba428fffe99c3cb12b9806af 100644
--- a/test/metabase/sync/sync_dynamic_test.clj
+++ b/test/metabase/sync/sync_dynamic_test.clj
@@ -8,8 +8,8 @@
    [metabase.test :as mt]
    [metabase.test.mock.toucanery :as toucanery]
    [metabase.util :as u]
-   [toucan.db :as db]
-   [toucan.hydrate :refer [hydrate]]))
+   [toucan.hydrate :refer [hydrate]]
+   [toucan2.core :as t2]))
 
 (defn- remove-nonsense
   "Remove fields that aren't really relevant in the output for `tables` and their `fields`. Done for the sake of making
@@ -25,7 +25,7 @@
                               [:table_id :name :fk_target_field_id :parent_id :base_type :database_type :database_is_auto_increment]))))))))
 
 (defn- get-tables [database-or-id]
-  (->> (hydrate (db/select Table, :db_id (u/the-id database-or-id), {:order-by [:id]}) :fields)
+  (->> (hydrate (t2/select Table, :db_id (u/the-id database-or-id), {:order-by [:id]}) :fields)
        (mapv mt/boolean-ids-and-timestamps)))
 
 (deftest sync-nested-fields-test
diff --git a/test/metabase/sync/sync_metadata/comments_test.clj b/test/metabase/sync/sync_metadata/comments_test.clj
index 67c2e0a84ae021f9de31922eb5bb9f129a559c9d..0e834f75dbf77538be19f177001cb62af3414dea 100644
--- a/test/metabase/sync/sync_metadata/comments_test.clj
+++ b/test/metabase/sync/sync_metadata/comments_test.clj
@@ -15,7 +15,7 @@
 
 (defn- db->fields [db]
   (let [table-ids (t2/select-pks-set Table :db_id (u/the-id db))]
-    (set (map (partial into {}) (db/select ['Field :name :description] :table_id [:in table-ids])))))
+    (set (map (partial into {}) (t2/select ['Field :name :description] :table_id [:in table-ids])))))
 
 (tx/defdataset basic-field-comments
   [["basic_field_comments"
@@ -87,7 +87,7 @@
                                                     :table-comment     comment}]}))
 
 (defn- db->tables [db]
-  (set (map (partial into {}) (db/select [Table :name :description] :db_id (u/the-id db)))))
+  (set (map (partial into {}) (t2/select [Table :name :description] :db_id (u/the-id db)))))
 
 (deftest table-comments-test
   (testing "test basic comments on table"
diff --git a/test/metabase/sync/sync_metadata/fields/sync_instances_test.clj b/test/metabase/sync/sync_metadata/fields/sync_instances_test.clj
index 6107a8f5d56a5c33e258e07b17a9ace644d6ecbb..c39b84cf2efac7e0760ce9c5b6b8a071e684a77b 100644
--- a/test/metabase/sync/sync_metadata/fields/sync_instances_test.clj
+++ b/test/metabase/sync/sync_metadata/fields/sync_instances_test.clj
@@ -22,7 +22,7 @@
              "name"    nil}})
 
 (defn- actual-fields-hierarchy [table-or-id]
-  (let [parent-id->children (group-by :parent_id (db/select [Field :id :parent_id :name] :table_id (u/the-id table-or-id)))
+  (let [parent-id->children (group-by :parent_id (t2/select [Field :id :parent_id :name] :table_id (u/the-id table-or-id)))
         format-fields       (fn format-fields [fields]
                               (into {} (for [field fields]
                                          [(:name field) (when-let [nested-fields (seq (parent-id->children (:id field)))]
diff --git a/test/metabase/sync/sync_metadata/fields_test.clj b/test/metabase/sync/sync_metadata/fields_test.clj
index 6f6bee3dc44add8bf0aee7ec1c40899e9c1e541b..c945bedce61ed01ccd86da0373211539521b60ab 100644
--- a/test/metabase/sync/sync_metadata/fields_test.clj
+++ b/test/metabase/sync/sync_metadata/fields_test.clj
@@ -59,7 +59,7 @@
                     (fn [database]
                       (set
                        (map (partial into {})
-                            (db/select [Field :id :name :active]
+                            (t2/select [Field :id :name :active]
                               :table_id [:in (t2/select-pks-set Table :db_id (u/the-id database))])))))]
       (is (= {:before-sync #{{:name "species",      :active true}
                              {:name "example_name", :active true}}
@@ -84,7 +84,7 @@
             (fn [database]
               (set
                (map (partial into {})
-                    (db/select [Field :name :active]
+                    (t2/select [Field :name :active]
                       :table_id [:in (t2/select-pks-set Table :db_id (u/the-id database))])))))))))
 
 (deftest dont-show-deleted-fields-test
diff --git a/test/metabase/sync/sync_metadata/sync_database_type_test.clj b/test/metabase/sync/sync_metadata/sync_database_type_test.clj
index 5b12c5ef7319613ce96c5bba169cefec14bf1acf..efafda5c957d90440c49559d9710a48715f75c72 100644
--- a/test/metabase/sync/sync_metadata/sync_database_type_test.clj
+++ b/test/metabase/sync/sync_metadata/sync_database_type_test.clj
@@ -32,7 +32,7 @@
                      {:name "LONGITUDE",   :database_type "DOUBLE PRECISION"}
                      {:name "NAME",        :database_type "CHARACTER VARYING"}}
                    (set (mt/derecordize
-                         (db/select [Field :name :database_type] :table_id (u/the-id venues-table))))))))))))
+                         (t2/select [Field :name :database_type] :table_id (u/the-id venues-table))))))))))))
 
 (deftest update-base-type-test
   (testing "make sure that if a driver reports back a different base-type the Field gets updated accordingly"
@@ -59,4 +59,4 @@
                      {:name "NAME",        :base_type :type/Text}
                      {:name "ID",          :base_type :type/BigInteger}}
                    (set (mt/derecordize
-                         (db/select [Field :name :base_type] :table_id (u/the-id venues-table))))))))))))
+                         (t2/select [Field :name :base_type] :table_id (u/the-id venues-table))))))))))))
diff --git a/test/metabase/sync/sync_metadata/tables_test.clj b/test/metabase/sync/sync_metadata/tables_test.clj
index 4c9abac24db0d017184c8d5f642d44dfc4e98b4d..d0ef337d7e918ef4c70f780d5da878863ef3177a 100644
--- a/test/metabase/sync/sync_metadata/tables_test.clj
+++ b/test/metabase/sync/sync_metadata/tables_test.clj
@@ -7,7 +7,6 @@
    [metabase.test :as mt]
    [metabase.test.data.interface :as tx]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (tx/defdataset db-with-some-cruft
@@ -29,7 +28,7 @@
     (mt/dataset metabase.sync.sync-metadata.tables-test/db-with-some-cruft
       (is (= #{{:name "SOUTH_MIGRATIONHISTORY", :visibility_type :cruft, :initial_sync_status "complete"}
                {:name "ACQUIRED_TOUCANS",       :visibility_type nil,    :initial_sync_status "complete"}}
-             (set (for [table (db/select [Table :name :visibility_type :initial_sync_status], :db_id (mt/id))]
+             (set (for [table (t2/select [Table :name :visibility_type :initial_sync_status], :db_id (mt/id))]
                     (into {} table))))))))
 
 (deftest retire-tables-test
diff --git a/test/metabase/sync_test.clj b/test/metabase/sync_test.clj
index f036cc651aa34262b3dab25d86210299c5fefd50..488799f62ead849ee88d7766719d85cf17021ce2 100644
--- a/test/metabase/sync_test.clj
+++ b/test/metabase/sync_test.clj
@@ -15,7 +15,6 @@
    [metabase.test.mock.util :as mock.util]
    [metabase.test.util :as tu]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 ;;; +----------------------------------------------------------------------------------------------------------------+
@@ -94,7 +93,7 @@
 
 (defn- table-details [table]
   (into {} (-> (dissoc table :db :pk_field :field_values)
-               (assoc :fields (for [field (db/select Field, :table_id (:id table), {:order-by [:name]})]
+               (assoc :fields (for [field (t2/select Field, :table_id (:id table), {:order-by [:name]})]
                                 (into {} (-> field
                                              (update :fingerprint map?)
                                              (update :fingerprint_version (complement zero?))))))
@@ -198,7 +197,7 @@
 (deftest sync-database-test
   (mt/with-temp Database [db {:engine ::sync-test}]
     (sync/sync-database! db)
-    (let [[movie studio] (mapv table-details (db/select Table :db_id (u/the-id db) {:order-by [:name]}))]
+    (let [[movie studio] (mapv table-details (t2/select Table :db_id (u/the-id db) {:order-by [:name]}))]
       (testing "`movie` Table"
         (is (= (merge
                 (table-defaults)
diff --git a/test/metabase/task/task_history_cleanup_test.clj b/test/metabase/task/task_history_cleanup_test.clj
index e42d7ced258bf449833dc8700005579eb21e588f..69f243efa28457f9c1a7d900956f28c282440491 100644
--- a/test/metabase/task/task_history_cleanup_test.clj
+++ b/test/metabase/task/task_history_cleanup_test.clj
@@ -8,7 +8,6 @@
    [metabase.task.task-history-cleanup :as cleanup-task]
    [metabase.test :as mt]
    [metabase.util :as u]
-   [toucan.db :as db]
    [toucan2.core :as t2]))
 
 (deftest cleanup-test
@@ -30,7 +29,7 @@
                   (#'cleanup-task/task-history-cleanup!))
                 (thunk)))
             (task-history-tasks []
-              (set (map :task (db/select TaskHistory))))]
+              (set (map :task (t2/select TaskHistory))))]
       (testing "Basic run of the cleanup task when it needs to remove rows. Should also add a TaskHistory row once complete"
         (do-with-tasks
          {:rows-to-keep 2}
diff --git a/test/metabase/test.clj b/test/metabase/test.clj
index b4a257675f2f5d794b32613b3b31e56b7b781113..32eb18ccb9459f56d3b3e713231ea817bcad6fa8 100644
--- a/test/metabase/test.clj
+++ b/test/metabase/test.clj
@@ -308,7 +308,7 @@
 
 (defn do-with-single-admin-user
   [attributes thunk]
-  (let [existing-admin-memberships (db/select PermissionsGroupMembership :group_id (:id (perms-group/admin)))
+  (let [existing-admin-memberships (t2/select PermissionsGroupMembership :group_id (:id (perms-group/admin)))
         _                          (db/simple-delete! PermissionsGroupMembership :group_id (:id (perms-group/admin)))
         existing-admin-ids         (t2/select-pks-set User :is_superuser true)
         _                          (when (seq existing-admin-ids)
diff --git a/test/metabase/test/data/impl.clj b/test/metabase/test/data/impl.clj
index fab9be1e44a12af42dea7f49743624d574397716..4c1235f119c5f6d8a1c4eb55312ddae82489366e 100644
--- a/test/metabase/test/data/impl.clj
+++ b/test/metabase/test/data/impl.clj
@@ -72,7 +72,7 @@
                            (throw (Exception. (format "Table '%s' not loaded from definition:\n%s\nFound:\n%s"
                                                       table-name
                                                       (u/pprint-to-str (dissoc table-definition :rows))
-                                                      (u/pprint-to-str (db/select [Table :schema :name], :db_id (:id db))))))))]
+                                                      (u/pprint-to-str (t2/select [Table :schema :name], :db_id (:id db))))))))]
       (doseq [{:keys [field-name], :as field-definition} (:field-definitions table-definition)]
         (let [field (delay (or (tx/metabase-instance field-definition @table)
                                (throw (Exception. (format "Field '%s' not loaded from definition:\n%s"
@@ -213,7 +213,7 @@
     field-name))
 
 (defn- all-field-names [table-id]
-  (into {} (for [field (db/select Field :active true, :table_id table-id)]
+  (into {} (for [field (t2/select Field :active true, :table_id table-id)]
              [(u/the-id field) (qualified-field-name field)])))
 
 (defn- the-field-id* [table-id field-name & {:keys [parent-id]}]
@@ -253,12 +253,12 @@
 
 (defn- copy-table-fields! [old-table-id new-table-id]
   (db/insert-many! Field
-    (for [field (db/select Field :table_id old-table-id {:order-by [[:id :asc]]})]
+    (for [field (t2/select Field :table_id old-table-id {:order-by [[:id :asc]]})]
       (-> field (dissoc :id :fk_target_field_id) (assoc :table_id new-table-id))))
   ;; now copy the FieldValues as well.
   (let [old-field-id->name (t2/select-pk->fn :name Field :table_id old-table-id)
         new-field-name->id (t2/select-fn->pk :name Field :table_id new-table-id)
-        old-field-values   (db/select FieldValues :field_id [:in (set (keys old-field-id->name))])]
+        old-field-values   (t2/select FieldValues :field_id [:in (set (keys old-field-id->name))])]
     (db/insert-many! FieldValues
       (for [{old-field-id :field_id, :as field-values} old-field-values
             :let                                       [field-name (get old-field-id->name old-field-id)]]
@@ -267,7 +267,7 @@
             (assoc :field_id (get new-field-name->id field-name)))))))
 
 (defn- copy-db-tables! [old-db-id new-db-id]
-  (let [old-tables    (db/select Table :db_id old-db-id {:order-by [[:id :asc]]})
+  (let [old-tables    (t2/select Table :db_id old-db-id {:order-by [[:id :asc]]})
         new-table-ids (db/insert-many! Table
                         (for [table old-tables]
                           (-> table (dissoc :id) (assoc :db_id new-db-id))))]
@@ -309,7 +309,7 @@
 (defn- copy-secrets [database]
   (let [prop->old-id (get-linked-secrets database)]
     (if (seq prop->old-id)
-      (let [secrets (db/select [Secret :id :name :kind :source :value] :id [:in (set (vals prop->old-id))])
+      (let [secrets (t2/select [Secret :id :name :kind :source :value] :id [:in (set (vals prop->old-id))])
             new-ids (db/insert-many! Secret (map #(dissoc % :id) secrets))
             old-id->new-id (zipmap (map :id secrets) new-ids)]
         (assoc database
diff --git a/test/metabase/test/data/users.clj b/test/metabase/test/data/users.clj
index 51d231fdb5c11c7ff7e4944f1d67cd8dda2457cf..e8841d5c716d998a0d8ac444d497aa6caca50348 100644
--- a/test/metabase/test/data/users.clj
+++ b/test/metabase/test/data/users.clj
@@ -183,8 +183,9 @@
       (apply client-fn user args))
     (let [user-id             (u/the-id user)
           user-email          (t2/select-one-fn :email User :id user-id)
-          [old-password-info] (db/simple-select User {:select [:password :password_salt]
-                                                      :where  [:= :id user-id]})]
+          [old-password-info] (t2/query {:select [:password :password_salt]
+                                         :from   [:core_user]
+                                         :where  [:= :id user-id]})]
       (when-not user-email
         (throw (ex-info "User does not exist" {:user user})))
       (try