From a5c00eaff67eba83135956586070e6fe000ef5d3 Mon Sep 17 00:00:00 2001
From: Mike Beck
How can I produce a PDF schema of my database?
`foreign_table` varchar(64) NOT NULL default '',
`foreign_field` varchar(64) NOT NULL default '',
- `pdf_page_number` int(11) NOT NULL default '0',
PRIMARY KEY (`master_table`,`master_field`),
KEY pdf_page_number (`pdf_page_number`)
) TYPE=MyISAM COMMENT='Relation table';
@@ -653,12 +652,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
If you created a relation table before release 2.3.0, you can upgrade
it with those commands, assuming your table name is "PMA_relation":
- ALTER TABLE `PMA_relation` CHANGE src_table master_table VARCHAR(64) NOT NULL
- ALTER TABLE `PMA_relation` CHANGE src_column master_field VARCHAR(64) NOT NULL
- ALTER TABLE `PMA_relation` CHANGE dest_table foreign_table VARCHAR(64) NOT NULL
- ALTER TABLE `PMA_relation` CHANGE dest_column foreign_field VARCHAR(64) NOT NULL
- ALTER TABLE `PMA_relation` ADD `pdf_page_number` int(11) NOT NULL;
- ALTER TABLE `PMA_relation` ADD INDEX(`pdf_page_number`);
+ ALTER TABLE `PMA_relation` CHANGE src_table master_table VARCHAR(64) NOT NULL;
+ ALTER TABLE `PMA_relation` CHANGE src_column master_field VARCHAR(64) NOT NULL;
+ ALTER TABLE `PMA_relation` CHANGE dest_table foreign_table VARCHAR(64) NOT NULL;
+ ALTER TABLE `PMA_relation` CHANGE dest_column foreign_field VARCHAR(64) NOT NULL;
@@ -712,7 +709,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
table.
PDF output is supported under PHP4, and you must be using also the
- 'relation' feature. Also, we used the fpdf library which currently
+ 'relation' feature and have a table of PDF Pages (see $cfg['Servers'][$i]['pdf_pages']).
+ Also, we used the fpdf library which currently
only supports iso-8859 (Latin1) character sets in PDF.
To use this functionality you have to:
@@ -734,9 +732,41 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
put the table name in
$cfg['Servers'][$i]['table_coords']
+
+ Usage tips: PDF output.
+
+
+
+ This configuration variable will hold the name of this special
+ table.
+
+ PDF output is supported under PHP4, and you must be using also the
+ 'relation' feature and have a table of PDF Pages (see $cfg['Servers'][$i]['pdf_pages']).
+ Also, we used the fpdf library which currently
+ only supports iso-8859 (Latin1) character sets in PDF.
+
+ To use this functionality you have to:
+
+
+ CREATE TABLE PMA_pdf_pages (
+ page_nr int(10) unsigned NOT NULL auto_increment,
+ page_descr varchar(50) NOT NULL default '',
+ PRIMARY KEY (page_nr)
+ ) TYPE=MyISAM COMMENT='PDF Relationpages for PMA';
+
+
Usage tips: PDF output.
@@ -1856,24 +1886,33 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
- First you have to fill the 'relation' and 'table_coords'
+ First you have to fill the 'relation', 'table_coords' and 'pdf_pages'
configuration variables.
Then, think about your schema layout: which tables will go on which pages.
- You have to fill in the 'relation' table the page number for each
- master-foreign link.
-
- A table may be displayed on more that one page, depending on how many
- links it has to other tables.
-
- Then manually fill the table_coords table with the page number and
- the coordinates, x being the width and y the height, and (0,0) at the upper
- left corner.
- For example, x=100 and y=200 means that the table will be at 200 mm down
- and 100 mm right from the upper left corner.
-
- To generate the output, click on your database name, then choose
- 'Structure' and 'Display PDF schema', and enter the page number.
+
+
+ First you will have to guess this coordinates of course, so just
+ expect to have an area of about 297 * 210 and put the tables coordinates somewhere
+ in there, you will be able to have a look at what happened and change them later.
+ For example, x=100 and y=200 means that the table will be at 200 mm down
+ and 100 mm right from the upper left corner.
+ For testing it might be useful to show the Grid as well, so you can see the coordinates used
+ maybe also choose Color and submit.