cloudinary-8.x-1.x-dev/modules/cloudinary_storage/modules/cloudinary_storage_db/cloudinary_storage_db.install

modules/cloudinary_storage/modules/cloudinary_storage_db/cloudinary_storage_db.install
<?php

/**
 * @file
 * Provides installation functions.
 */

/**
 * Implements hook_disable().
 */
function cloudinary_storage_db_disable() {
  // Delete all saved resource data in db.
  $storage = new CloudinaryStorageDb();
  $storage->clear();
}

/**
 * Implements hook_schema().
 */
function cloudinary_storage_db_schema() {
  $schema['cloudinary_storage'] = array(
    'description' => 'Stores information for uploaded Cloudinary files.',
    'fields' => array(
      'public_id' => array(
        'description' => 'The public_id of Cloudinary file.',
        'type' => 'varchar_ascii',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'mode' => array(
        'description' => 'The file mode, file or directory.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'metadata' => array(
        'description' => 'The file metadata.',
        'type' => 'text',
        'serialize' => TRUE,
        'not null' => FALSE,
      ),
    ),
    'primary key' => ['public_id'],
  );

  return $schema;
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc