function shorten_cs_schema in Shorten URLs 8.2
Same name and namespace in other branches
- 8 modules/shorten_cs/shorten_cs.install \shorten_cs_schema()
- 6 shorten_cs.install \shorten_cs_schema()
- 7.2 shorten_cs.install \shorten_cs_schema()
- 7 shorten_cs.install \shorten_cs_schema()
Implements hook_schema().
File
- modules/
shorten_cs/ shorten_cs.install, line 11 - (Un)installs the Shorten URLs Custom Services module.
Code
function shorten_cs_schema() {
$schema = [];
$schema['shorten_cs'] = [
'description' => 'Stores custom services for the Shorten URLs module.',
'fields' => [
'sid' => [
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
'description' => 'The Service ID.',
],
'name' => [
'type' => 'varchar',
'length' => 190,
'not null' => TRUE,
'default' => '',
'description' => 'The name of the URL shortening service.',
],
'url' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The API endpoint URL.',
],
'type' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The type of API response.',
],
'tag' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The XML tag or JSON key identifying the shortened URL from the API response, if applicable.',
],
],
'indexes' => [],
'unique keys' => [
'name' => [
'name',
],
],
'primary key' => [
'sid',
],
];
return $schema;
}