diff --git a/src/Storage/IntColumnHandler.php b/src/Storage/IntColumnHandler.php
index 75dcb53..7d8912d 100644
--- a/src/Storage/IntColumnHandler.php
+++ b/src/Storage/IntColumnHandler.php
@@ -100,13 +100,13 @@ abstract class IntColumnHandler implements IntColumnHandlerInterface {
     }
     if ($new) {
       $body = implode(', ', $body);
-      $prefixed_name = $this->connection->prefixTables('{' . $table . '}');
+      $prefixed_name = str_replace('"', '', $this->connection->prefixTables('{' . $table . '}'));
       foreach (['update', 'insert'] as $op) {
         $trigger = $prefixed_name . '_der_' . $op;
         if (strlen($trigger) > 64) {
           $trigger = substr($trigger, 0, 56) . substr(hash('sha256', $trigger), 0, 8);
         }
-        $this->connection->query("DROP TRIGGER IF EXISTS $trigger");
+        $this->dropTrigger($trigger);
         if ($body) {
           $this->createTrigger($trigger, $op, $prefixed_name, $body);
         }
@@ -156,4 +156,14 @@ abstract class IntColumnHandler implements IntColumnHandlerInterface {
 
   }
 
+  /**
+   * Actually drops the trigger.
+   *
+   * @param string $trigger
+   *   The name of the trigger.
+   */
+  protected function dropTrigger($trigger) {
+    $this->connection->query("DROP TRIGGER IF EXISTS $trigger");
+  }
+
 }
diff --git a/src/Storage/IntColumnHandlerMySQL.php b/src/Storage/IntColumnHandlerMySQL.php
index 1ad145b..8787065 100644
--- a/src/Storage/IntColumnHandlerMySQL.php
+++ b/src/Storage/IntColumnHandlerMySQL.php
@@ -18,7 +18,7 @@ class IntColumnHandlerMySQL extends IntColumnHandler {
    * {@inheritdoc}
    */
   protected function createTrigger($trigger, $op, $prefixed_name, $body) {
-    $this->connection->query("CREATE TRIGGER $trigger BEFORE $op ON $prefixed_name FOR EACH ROW SET $body");
+    $this->connection->query("CREATE TRIGGER $trigger BEFORE $op ON $prefixed_name FOR EACH ROW SET $body", [], ['allow_square_brackets' => TRUE]);
   }
 
 }
diff --git a/src/Storage/IntColumnHandlerPostgreSQL.php b/src/Storage/IntColumnHandlerPostgreSQL.php
index 18b5f1e..ea8130c 100644
--- a/src/Storage/IntColumnHandlerPostgreSQL.php
+++ b/src/Storage/IntColumnHandlerPostgreSQL.php
@@ -84,7 +84,7 @@ class IntColumnHandlerPostgreSQL implements IntColumnHandlerInterface {
     if (strpos($query, ';') !== FALSE) {
       throw new \InvalidArgumentException('; is not supported in SQL strings. Use only one statement at a time.');
     }
-    $this->connection->query("$query; RETURN NEW; END; $$ LANGUAGE plpgsql IMMUTABLE RETURNS NULL ON NULL INPUT", [], ['allow_delimiter_in_query' => TRUE]);
+    $this->connection->query("$query; RETURN NEW; END; $$ LANGUAGE plpgsql IMMUTABLE RETURNS NULL ON NULL INPUT", [], ['allow_delimiter_in_query' => TRUE, 'allow_square_brackets' => TRUE]);
   }
 
   /**
@@ -137,7 +137,7 @@ class IntColumnHandlerPostgreSQL implements IntColumnHandlerInterface {
    *   The prefixed table name.
    */
   protected function getPrefixedTable($table) {
-    return $this->connection->prefixTables('{' . $table . '}');
+    return trim($this->connection->prefixTables('{' . $table . '}'), '"');
   }
 
 }
diff --git a/src/Storage/IntColumnHandlerSQLite.php b/src/Storage/IntColumnHandlerSQLite.php
index 5d047c8..f584950 100644
--- a/src/Storage/IntColumnHandlerSQLite.php
+++ b/src/Storage/IntColumnHandlerSQLite.php
@@ -18,11 +18,8 @@ class IntColumnHandlerSQLite extends IntColumnHandler {
    * {@inheritdoc}
    */
   protected function createTrigger($trigger, $op, $prefixed_name, $body) {
-    $parts = explode('.', $prefixed_name);
-    // Simpletest for example prefixes with a database name but SQLite does
-    // not support referencing databases in the body of the trigger (even if it
-    // is the same database the triggering table is in).
-    $table_name = array_pop($parts);
+    $trigger = $this->removeQuoteIdentifiers($trigger);
+    $table_name = $this->removeQuoteIdentifiers($prefixed_name);
     $query = "
         CREATE TRIGGER $trigger AFTER $op ON $prefixed_name
         FOR EACH ROW
@@ -37,4 +34,29 @@ class IntColumnHandlerSQLite extends IntColumnHandler {
     $this->connection->query("$query; END", [], ['allow_delimiter_in_query' => TRUE]);
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function dropTrigger($trigger) {
+    $trigger = $this->removeQuoteIdentifiers($trigger);
+    $this->connection->query("DROP TRIGGER IF EXISTS $trigger");
+  }
+
+  /**
+   * Helper method to remove quote identifiers.
+   *
+   * @param string $value
+   *   The input string.
+   *
+   * @return string
+   *   The return value.
+   */
+  private function removeQuoteIdentifiers($value) {
+    $parts = explode('.', $value);
+    // Simpletest for example prefixes with a database name but SQLite does
+    // not support referencing databases in the body of the trigger (even if it
+    // is the same database the triggering table is in).
+    return array_pop($parts);
+  }
+
 }
diff --git a/tests/src/Functional/DynamicEntityReferenceBaseTest.php b/tests/src/Functional/DynamicEntityReferenceBaseTest.php
index b8d63e6..f4e669d 100644
--- a/tests/src/Functional/DynamicEntityReferenceBaseTest.php
+++ b/tests/src/Functional/DynamicEntityReferenceBaseTest.php
@@ -239,7 +239,7 @@ class DynamicEntityReferenceBaseTest extends BrowserTestBase {
       'selection_handler' => $settings['entity_test']['handler'],
       'selection_settings_key' => $selection_settings_key,
     ])->toString();
-    $this->assertContains($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path);
+    $this->assertStringContainsString($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path);
 
     // Add some extra dynamic entity reference fields.
     $this->getSession()->getPage()->findButton('Add another item')->click();
diff --git a/tests/src/Functional/DynamicEntityReferenceTest.php b/tests/src/Functional/DynamicEntityReferenceTest.php
index 9ed8094..f78ea24 100644
--- a/tests/src/Functional/DynamicEntityReferenceTest.php
+++ b/tests/src/Functional/DynamicEntityReferenceTest.php
@@ -250,7 +250,7 @@ class DynamicEntityReferenceTest extends BrowserTestBase {
       'selection_handler' => $settings['entity_test_computed_field']['handler'],
       'selection_settings_key' => $selection_settings_key,
     ])->toString();
-    $this->assertContains($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path);
+    $this->assertStringContainsString($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path);
 
     // Add some extra dynamic entity reference fields.
     $this->getSession()->getPage()->findButton('Add another item')->click();
@@ -298,7 +298,7 @@ class DynamicEntityReferenceTest extends BrowserTestBase {
         'selection_handler' => $settings[$expected_entity_type]['handler'],
         'selection_settings_key' => $selection_settings_key,
       ])->toString();
-      $this->assertContains($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path);
+      $this->assertStringContainsString($input->getAttribute('data-autocomplete-path'), $expected_autocomplete_path);
     }
 
     $edit = [
