permission_csv_export.install in Permissions Csv Export 7
Install, update and uninstall functions for the permission csv export module.
File
permission_csv_export.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the permission csv export module.
*/
/**
* Implements hook_schema().
*/
function permission_csv_export_schema() {
$schema['permissions_csv_export_data'] = [
'description' => 'Stores the csv data to which user wants to import.',
'fields' => [
'id' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Primary Key: Unique ID.',
],
'permission' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Permission name.',
],
'rids' => [
'type' => 'text',
'not null' => TRUE,
'description' => "Serialized array of role id's",
],
],
'unique keys' => [
'id' => [
'id',
],
],
'primary key' => [
'id',
],
];
$schema['permissions_csv_export_logs'] = [
'description' => 'Stores the csv files import logs.',
'fields' => [
'id' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Primary Key: Unique ID.',
],
'fid' => [
'type' => 'int',
'length' => 10,
'not null' => TRUE,
'default' => 0,
'description' => 'fid of uploaded file.',
],
'uid' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => "user id who uploaded the file.",
],
'import_roles' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => "serialize data of rid's to which roles should get imported.",
],
'status' => [
'type' => 'int',
'not null' => TRUE,
'description' => "Status of updated file.",
],
'created' => [
'type' => 'int',
'not null' => TRUE,
'description' => "Timestamp when the row is created.",
],
'updated' => [
'type' => 'int',
'not null' => TRUE,
'description' => "Timestamp when the row is last updated.",
],
],
'unique keys' => [
'id' => [
'id',
],
],
'primary key' => [
'id',
],
];
$schema['permissions_csv_export_last_bakup'] = [
'description' => 'Stores the backup of last permissions which were used before importing.',
'fields' => [
'id' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Primary Key: Unique ID.',
],
'permission' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Permission name.',
],
'rids' => [
'type' => 'text',
'not null' => TRUE,
'description' => "Serialized array of role id's",
],
],
'unique keys' => [
'id' => [
'id',
],
],
'primary key' => [
'id',
],
];
return $schema;
}
Functions
Name![]() |
Description |
---|---|
permission_csv_export_schema | Implements hook_schema(). |