pdf schema
This commit is contained in:
@@ -601,7 +601,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
in query-by-example, create automatic joints (see an example
|
in query-by-example, create automatic joints (see an example
|
||||||
in the FAQ, section "Using phpMyAdmin").
|
in the FAQ, section "Using phpMyAdmin");
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
enable you to get a PDF schema of your database.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br />
|
<br />
|
||||||
@@ -621,8 +624,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
`foreign_table` varchar(32) NOT NULL default '',<br />
|
`foreign_table` varchar(32) NOT NULL default '',<br />
|
||||||
`foreign_field` varchar(32) NOT NULL default '',<br />
|
`foreign_field` varchar(32) NOT NULL default '',<br />
|
||||||
`foreign_display_field` varchar(32) NOT NULL default '',<br />
|
`foreign_display_field` varchar(32) NOT NULL default '',<br />
|
||||||
PRIMARY KEY (`master_table`,`master_field`)<br />
|
`pdf_page_number` int(11) NOT NULL default '0',<br />
|
||||||
) TYPE=MyISAM COMMENT='Table Relation';<br />
|
PRIMARY KEY (`master_table`,`master_field`),<br />
|
||||||
|
KEY pdf_page_number (`pdf_page_number`)<br />
|
||||||
|
) TYPE=MyISAM COMMENT='Relation table';<br />
|
||||||
</tt>
|
</tt>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@@ -642,9 +647,49 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
ALTER TABLE relation CHANGE dest_table foreign_table VARCHAR(32) NOT NULL<br />
|
ALTER TABLE relation CHANGE dest_table foreign_table VARCHAR(32) NOT NULL<br />
|
||||||
ALTER TABLE relation CHANGE dest_column foreign_field VARCHAR(32) NOT NULL<br />
|
ALTER TABLE relation CHANGE dest_column foreign_field VARCHAR(32) NOT NULL<br />
|
||||||
ALTER TABLE `relation` ADD `foreign_display_field` VARCHAR(32) NOT NULL;<br />
|
ALTER TABLE `relation` ADD `foreign_display_field` VARCHAR(32) NOT NULL;<br />
|
||||||
|
ALTER TABLE `relation` ADD `pdf_page_number` int(11) NOT NULL;<br />
|
||||||
|
ALTER TABLE `relation` ADD INDEX(`pdf_page_number`);<br />
|
||||||
</tt><br />
|
</tt><br />
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<b>$cfg['Servers'][$i]['pdf_table_position']</b> string
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Since release 2.3.0 you can describe, in a special 'pdf_table_position'
|
||||||
|
table, the coordinates where each table will be placed on a PDF schema
|
||||||
|
output. This configuration variable will hold the name of this special
|
||||||
|
table.
|
||||||
|
<br /><br />
|
||||||
|
This feature is supported under PHP4, and you must be using also
|
||||||
|
the 'relation' feature.
|
||||||
|
<br /><br />
|
||||||
|
To use this functionality you have to:
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
create in the same database a table (for example 'pdf_table_position')
|
||||||
|
following this scheme:<br />
|
||||||
|
<tt>
|
||||||
|
CREATE TABLE `pdf_table_position` (<br />
|
||||||
|
`table_name` varchar(50) NOT NULL default '',<br />
|
||||||
|
`x` float unsigned NOT NULL default '0',<br />
|
||||||
|
`y` float unsigned NOT NULL default '0'<br />
|
||||||
|
PRIMARY KEY (`table_name`)<br />
|
||||||
|
) TYPE=MyISAM COMMENT='Table positions for PDF schema';<br />
|
||||||
|
</tt>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
put the table name in
|
||||||
|
<tt>$cfg['Servers'][$i]['pdf_table_position']</tt>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
then manually fill this table with information about
|
||||||
|
the table positions on the PDF schema.
|
||||||
|
</li>
|
||||||
|
</ul><br />
|
||||||
|
See also this <a class="navigation" href="#faqpdf">usage tip.</a><br /><br />
|
||||||
|
</dd>
|
||||||
|
|
||||||
<dt><b>$cfg['ServerDefault']</b> integer</dt>
|
<dt><b>$cfg['ServerDefault']</b> integer</dt>
|
||||||
<dd>
|
<dd>
|
||||||
If you have more than one server configured, you can set
|
If you have more than one server configured, you can set
|
||||||
@@ -1593,11 +1638,13 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
foreign_table varchar(32) NOT NULL default '',<br />
|
foreign_table varchar(32) NOT NULL default '',<br />
|
||||||
foreign_field varchar(32) NOT NULL default '',<br />
|
foreign_field varchar(32) NOT NULL default '',<br />
|
||||||
foreign_display_field varchar(32) NOT NULL default '',<br />
|
foreign_display_field varchar(32) NOT NULL default '',<br />
|
||||||
PRIMARY KEY (master_table,master_field)<br />
|
pdf_page_number int(11) NOT NULL default '0',<br />
|
||||||
|
PRIMARY KEY (master_table,master_field),<br />
|
||||||
|
KEY pdf_page_number (`pdf_page_number`)<br />
|
||||||
) TYPE=MyISAM;<br />
|
) TYPE=MyISAM;<br />
|
||||||
<br />
|
<br />
|
||||||
INSERT INTO relation VALUES ('persons', 'town_code', 'towns', 'town_code','description');<br />
|
INSERT INTO relation VALUES ('persons', 'town_code', 'towns', 'town_code','description', 1);<br />
|
||||||
INSERT INTO relation VALUES ('persons', 'country_code', 'countries', 'country_code','description');<br />
|
INSERT INTO relation VALUES ('persons', 'country_code', 'countries', 'country_code','description', 1);<br />
|
||||||
<br />
|
<br />
|
||||||
CREATE TABLE towns (<br />
|
CREATE TABLE towns (<br />
|
||||||
town_code varchar(5) NOT NULL default '0',<br />
|
town_code varchar(5) NOT NULL default '0',<br />
|
||||||
@@ -1625,6 +1672,26 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
|
|||||||
<li>Click "Submit query"</li>
|
<li>Click "Submit query"</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br />
|
<br />
|
||||||
|
<a name="faqpdf"></a>
|
||||||
|
<p>
|
||||||
|
<b>How can I produce a PDF schema of my database?</b>
|
||||||
|
<br />
|
||||||
|
First you have to fill the 'relation' and 'pdf_table_position'
|
||||||
|
configuration variables.
|
||||||
|
<br /><br />
|
||||||
|
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.
|
||||||
|
<br /><br />
|
||||||
|
Then manually fill the pdf_table_position table with 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.
|
||||||
|
<br /><br />
|
||||||
|
To produce the output, click on your database name, then choose 'Structure'
|
||||||
|
and 'Display PDF schema', and enter the page number.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<a name="faqproject"></a>
|
<a name="faqproject"></a>
|
||||||
<h3>[phpMyAdmin project]</h3>
|
<h3>[phpMyAdmin project]</h3>
|
||||||
@@ -1866,7 +1933,7 @@ code since version 2.1.0:
|
|||||||
- Christophe Gesch<63> from the "MySQL Form Generator for PHPMyAdmin"
|
- Christophe Gesch<63> from the "MySQL Form Generator for PHPMyAdmin"
|
||||||
(http://sourceforge.net/projects/phpmysqlformgen/) who suggested the patch
|
(http://sourceforge.net/projects/phpmysqlformgen/) who suggested the patch
|
||||||
for multiple table printviews.
|
for multiple table printviews.
|
||||||
- Garvin Hicking <hicking at faktor-e.de> who builds the patch for
|
- Garvin Hicking <hicking at faktor-e.de> who built the patch for
|
||||||
vertical display of table rows.
|
vertical display of table rows.
|
||||||
- Yukihiro Kawada <kawada at den.fujifilm.co.jp> for the japanese kanji
|
- Yukihiro Kawada <kawada at den.fujifilm.co.jp> for the japanese kanji
|
||||||
encoding conversion feature.
|
encoding conversion feature.
|
||||||
@@ -1876,6 +1943,8 @@ code since version 2.1.0:
|
|||||||
relation-links feature.
|
relation-links feature.
|
||||||
- Mike Beck <mike.beck at ibmiller.de> for his work on the Relation table
|
- Mike Beck <mike.beck at ibmiller.de> for his work on the Relation table
|
||||||
feature: automatic joint in QBE, links column in printview, Relation view.
|
feature: automatic joint in QBE, links column in printview, Relation view.
|
||||||
|
- Maxime Delorme <delorme.maxime at free.fr> for the PDF schema output;
|
||||||
|
thanks also to Olivier Plathey for the fpdf library (www.fpdf.org).
|
||||||
|
|
||||||
And also to the following people who have contributed minor changes,
|
And also to the following people who have contributed minor changes,
|
||||||
enhancements, bugfixes or support for a new language since version 2.1.0:
|
enhancements, bugfixes or support for a new language since version 2.1.0:
|
||||||
|
Reference in New Issue
Block a user