1 -- -------------------------------------------------------------
2 -- SQL Commands to upgrade pmadb for normal phpMyAdmin operation
3 -- with MySQL 4.1.2 and above.
5 -- This file is meant for use with MySQL 4.1.2 and above!
6 -- For older MySQL releases, please use create_tables.sql
8 -- If you are running one MySQL 4.1.0 or 4.1.1, please create the tables using
9 -- create_tables.sql, then use this script.
11 -- Please don't forget to set up the tablenames in config.inc.php
15 -- --------------------------------------------------------
18 -- Database : `phpmyadmin`
20 ALTER DATABASE `phpmyadmin`
21 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
24 -- --------------------------------------------------------
27 -- Table structure for table `pma_bookmark`
29 ALTER TABLE `pma_bookmark`
30 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
32 ALTER TABLE `pma_bookmark`
33 CHANGE `dbase` `dbase` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
34 ALTER TABLE `pma_bookmark`
35 CHANGE `user` `user` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
36 ALTER TABLE `pma_bookmark`
37 CHANGE `label` `label` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
38 ALTER TABLE `pma_bookmark`
39 CHANGE `query` `query` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
41 -- --------------------------------------------------------
44 -- Table structure for table `pma_column_info`
47 ALTER TABLE `pma_column_info`
48 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
50 ALTER TABLE `pma_column_info`
51 CHANGE `db_name` `db_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
52 ALTER TABLE `pma_column_info`
53 CHANGE `table_name` `table_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
54 ALTER TABLE `pma_column_info`
55 CHANGE `column_name` `column_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
56 ALTER TABLE `pma_column_info`
57 CHANGE `comment` `comment` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
58 ALTER TABLE `pma_column_info`
59 CHANGE `mimetype` `mimetype` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
60 ALTER TABLE `pma_column_info`
61 CHANGE `transformation` `transformation` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
62 ALTER TABLE `pma_column_info`
63 CHANGE `transformation_options` `transformation_options` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
65 -- --------------------------------------------------------
68 -- Table structure for table `pma_history`
70 ALTER TABLE `pma_history`
71 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
73 ALTER TABLE `pma_history`
74 CHANGE `username` `username` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
75 ALTER TABLE `pma_history`
76 CHANGE `db` `db` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
77 ALTER TABLE `pma_history`
78 CHANGE `table` `table` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
79 ALTER TABLE `pma_history`
80 CHANGE `sqlquery` `sqlquery` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
82 -- --------------------------------------------------------
85 -- Table structure for table `pma_pdf_pages`
88 ALTER TABLE `pma_pdf_pages`
89 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
91 ALTER TABLE `pma_pdf_pages`
92 CHANGE `db_name` `db_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
93 ALTER TABLE `pma_pdf_pages`
94 CHANGE `page_descr` `page_descr` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default '';
96 -- --------------------------------------------------------
99 -- Table structure for table `pma_relation`
101 ALTER TABLE `pma_relation`
102 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
104 ALTER TABLE `pma_relation`
105 CHANGE `master_db` `master_db` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
106 ALTER TABLE `pma_relation`
107 CHANGE `master_table` `master_table` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
108 ALTER TABLE `pma_relation`
109 CHANGE `master_field` `master_field` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
110 ALTER TABLE `pma_relation`
111 CHANGE `foreign_db` `foreign_db` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
112 ALTER TABLE `pma_relation`
113 CHANGE `foreign_table` `foreign_table` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
114 ALTER TABLE `pma_relation`
115 CHANGE `foreign_field` `foreign_field` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
117 -- --------------------------------------------------------
120 -- Table structure for table `pma_table_coords`
123 ALTER TABLE `pma_table_coords`
124 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
126 ALTER TABLE `pma_table_coords`
127 CHANGE `db_name` `db_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
128 ALTER TABLE `pma_table_coords`
129 CHANGE `table_name` `table_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
131 -- --------------------------------------------------------
134 -- Table structure for table `pma_table_info`
137 ALTER TABLE `pma_table_info`
138 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
140 ALTER TABLE `pma_table_info`
141 CHANGE `db_name` `db_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
142 ALTER TABLE `pma_table_info`
143 CHANGE `table_name` `table_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
144 ALTER TABLE `pma_table_info`
145 CHANGE `display_field` `display_field` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
147 -- --------------------------------------------------------
150 -- Table structure for table `pma_designer_coords`
153 CREATE TABLE IF NOT EXISTS `pma_designer_coords` (
154 `db_name` varchar(64) NOT NULL default '',
155 `table_name` varchar(64) NOT NULL default '',
160 PRIMARY KEY (`db_name`,`table_name`)
162 ENGINE=MyISAM COMMENT='Table coordinates for Designer'
163 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;