<?php
global $runnerDbTableInfo;
$runnerDbTableInfo['qa_maintenance_attachment'] = array(
	'type' => 0,
	'foreignKeys' => array( 
		array(
			'name' => 'fk_qa_maintenance_attachment_header',
			'refTable' => 'qa_maintenance_inspection',
			'refSchema' => '',
			'del_rule' => 1,
			'upd_rule' => 1,
			'columns' => array( 
				array(
					'column' => 'qa_maintenance_inspection_id',
					'ref_column' => 'id' 
				) 
			) 
		) 
	),
	'fields' => array( 
		array(
			'name' => 'id',
			'type' => 20,
			'size' => 20,
			'scale' => 0,
			'typeName' => 'bigint(20)',
			'nullable' => false,
			'autoinc' => true,
			'defaultValueSQL' => null,
			'defaultValue' => '' 
		),
		array(
			'name' => 'qa_maintenance_inspection_id',
			'type' => 20,
			'size' => 20,
			'scale' => 0,
			'typeName' => 'bigint(20)',
			'nullable' => false,
			'autoinc' => false,
			'defaultValueSQL' => null,
			'defaultValue' => '' 
		),
		array(
			'name' => 'attachment_type',
			'type' => 129,
			'size' => 0,
			'scale' => 0,
			'typeName' => 'enum(\'PHOTO\',\'MAINTENANCE_REPORT\',\'OTHER\')',
			'enumValues' => array( 
				'PHOTO',
				'MAINTENANCE_REPORT',
				'OTHER' 
			),
			'nullable' => false,
			'autoinc' => false,
			'defaultValueSQL' => 'PHOTO',
			'defaultValue' => '' 
		),
		array(
			'name' => 'file_name',
			'type' => 200,
			'size' => 255,
			'scale' => 0,
			'typeName' => 'varchar(255)',
			'nullable' => true,
			'autoinc' => false,
			'defaultValueSQL' => null,
			'defaultValue' => '' 
		),
		array(
			'name' => 'file_path',
			'type' => 200,
			'size' => 500,
			'scale' => 0,
			'typeName' => 'varchar(500)',
			'nullable' => true,
			'autoinc' => false,
			'defaultValueSQL' => null,
			'defaultValue' => '' 
		),
		array(
			'name' => 'remarks',
			'type' => 200,
			'size' => 500,
			'scale' => 0,
			'typeName' => 'varchar(500)',
			'nullable' => true,
			'autoinc' => false,
			'defaultValueSQL' => null,
			'defaultValue' => '' 
		),
		array(
			'name' => 'uploaded_by',
			'type' => 20,
			'size' => 20,
			'scale' => 0,
			'typeName' => 'bigint(20)',
			'nullable' => true,
			'autoinc' => false,
			'defaultValueSQL' => null,
			'defaultValue' => '' 
		),
		array(
			'name' => 'uploaded_at',
			'type' => 135,
			'size' => 0,
			'scale' => 0,
			'typeName' => 'datetime',
			'nullable' => false,
			'autoinc' => false,
			'defaultValueSQL' => 'current_timestamp()',
			'defaultValue' => 'CURRENT_TIMESTAMP' 
		) 
	),
	'primaryKeys' => array( 
		'id' 
	),
	'uniqueFields' => array( 
		 
	),
	'name' => 'qa_maintenance_attachment' 
);
?>