You are here

function s3fs_update_7002 in S3 File System 7.2

Same name and namespace in other branches
  1. 7.3 s3fs.install \s3fs_update_7002()
  2. 7 s3fs.install \s3fs_update_7002()

Updates the s3fs_file table to use case sensitive collation.

File

./s3fs.install, line 240
Install, update and uninstall functions for the S3 File System module.

Code

function s3fs_update_7002() {
  $options = Database::getConnectionInfo('default');
  switch ($options['default']['driver']) {
    case 'pgsql':

      // Postgres uses binary collation by default
      break;
    case 'sqlite':

      // SQLite uses binary collation by default
      break;
    case 'mysql':

      // Set MySQL tables to use case-sensitive collation.
      db_query("ALTER TABLE {s3fs_file} CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin");
      break;
  }
}