| 1 |
<?php
|
| 2 |
/* $Id: pdfidcard.install */
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Installation script for the PDF-IDcard module
|
| 6 |
*/
|
| 7 |
|
| 8 |
function pdfidcard_schema(){
|
| 9 |
$schema['pdfidcard_templates'] = array(
|
| 10 |
'description' => 'Base table for pdfidcard.',
|
| 11 |
'fields' => array(
|
| 12 |
'templateid' => array(
|
| 13 |
'description' => 'The PDF template ID.',
|
| 14 |
'type' => 'serial',
|
| 15 |
'not null' => 'TRUE',
|
| 16 |
),
|
| 17 |
'name' => array(
|
| 18 |
'description' => 'The PDF template name',
|
| 19 |
'type' => 'varchar',
|
| 20 |
'length' => '255',
|
| 21 |
'not null' => 'TRUE',
|
| 22 |
'default' => ''),
|
| 23 |
'pageorient' => array(
|
| 24 |
'description' => 'not really sure',
|
| 25 |
'type' => 'char',
|
| 26 |
'length' => '1',
|
| 27 |
'not null' => 'TRUE',
|
| 28 |
'default' => ''),
|
| 29 |
'bgimage' => array(
|
| 30 |
'description' => 'not really sure',
|
| 31 |
'type' => 'varchar',
|
| 32 |
'length' => '255',
|
| 33 |
'not null' => 'TRUE',
|
| 34 |
'default' => 'TRUE'),
|
| 35 |
'pgstyle' => array(
|
| 36 |
'description' => 'not really sure',
|
| 37 |
'type' => 'varchar',
|
| 38 |
'length' => '6',
|
| 39 |
'not null' => 'TRUE',
|
| 40 |
'default' => ''),
|
| 41 |
'width' => array(
|
| 42 |
'description' => 'The PDF template width',
|
| 43 |
'type' => 'int',
|
| 44 |
'length' => '11',
|
| 45 |
'not null' => 'TRUE',
|
| 46 |
'default' => '0'),
|
| 47 |
'height' => array(
|
| 48 |
'description' => 'The PDF template height',
|
| 49 |
'type' => 'int',
|
| 50 |
'length' => '11',
|
| 51 |
'not null'=> 'TRUE',
|
| 52 |
'default' => '0'),
|
| 53 |
'php_format_code' => array(
|
| 54 |
'description' => '',
|
| 55 |
'type' => 'text',
|
| 56 |
'not null' => 'TRUE',
|
| 57 |
'default' => '')),
|
| 58 |
'primary key' => array('templateid')
|
| 59 |
); /*Schema*/
|
| 60 |
|
| 61 |
return $schema;
|
| 62 |
}
|
| 63 |
|
| 64 |
function pdfidcard_install() {
|
| 65 |
// Create my tables.
|
| 66 |
drupal_install_schema('pdfidcard');
|
| 67 |
}
|
| 68 |
|
| 69 |
function pdfidcard_uninstall() {
|
| 70 |
// Drop my tables.
|
| 71 |
drupal_uninstall_schema('pdfidcard');
|
| 72 |
}
|
| 73 |
?>
|