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
14 -- --------------------------------------------------------
17 -- Database : `phpmyadmin`
19 ALTER DATABASE `phpmyadmin`
20 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
23 -- --------------------------------------------------------
26 -- Table structure for table `pma_bookmark`
28 ALTER TABLE `pma_bookmark`
29 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
31 ALTER TABLE `pma_bookmark`
32 CHANGE `dbase` `dbase` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
33 ALTER TABLE `pma_bookmark`
34 CHANGE `user` `user` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
35 ALTER TABLE `pma_bookmark`
36 CHANGE `label` `label` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
37 ALTER TABLE `pma_bookmark`
38 CHANGE `query` `query` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
40 -- --------------------------------------------------------
43 -- Table structure for table `pma_column_info`
46 ALTER TABLE `pma_column_info`
47 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
49 ALTER TABLE `pma_column_info`
50 CHANGE `db_name` `db_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
51 ALTER TABLE `pma_column_info`
52 CHANGE `table_name` `table_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
53 ALTER TABLE `pma_column_info`
54 CHANGE `column_name` `column_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
55 ALTER TABLE `pma_column_info`
56 CHANGE `comment` `comment` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
57 ALTER TABLE `pma_column_info`
58 CHANGE `mimetype` `mimetype` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
59 ALTER TABLE `pma_column_info`
60 CHANGE `transformation` `transformation` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
61 ALTER TABLE `pma_column_info`
62 CHANGE `transformation_options` `transformation_options` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
64 -- --------------------------------------------------------
67 -- Table structure for table `pma_history`
69 ALTER TABLE `pma_history`
70 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
72 ALTER TABLE `pma_history`
73 CHANGE `username` `username` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
74 ALTER TABLE `pma_history`
75 CHANGE `db` `db` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
76 ALTER TABLE `pma_history`
77 CHANGE `table` `table` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
78 ALTER TABLE `pma_history`
79 CHANGE `sqlquery` `sqlquery` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
81 -- --------------------------------------------------------
84 -- Table structure for table `pma_pdf_pages`
87 ALTER TABLE `pma_pdf_pages`
88 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
90 ALTER TABLE `pma_pdf_pages`
91 CHANGE `db_name` `db_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
92 ALTER TABLE `pma_pdf_pages`
93 CHANGE `page_descr` `page_descr` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL default '';
95 -- --------------------------------------------------------
98 -- Table structure for table `pma_relation`
100 ALTER TABLE `pma_relation`
101 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
103 ALTER TABLE `pma_relation`
104 CHANGE `master_db` `master_db` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
105 ALTER TABLE `pma_relation`
106 CHANGE `master_table` `master_table` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
107 ALTER TABLE `pma_relation`
108 CHANGE `master_field` `master_field` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
109 ALTER TABLE `pma_relation`
110 CHANGE `foreign_db` `foreign_db` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
111 ALTER TABLE `pma_relation`
112 CHANGE `foreign_table` `foreign_table` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
113 ALTER TABLE `pma_relation`
114 CHANGE `foreign_field` `foreign_field` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
116 -- --------------------------------------------------------
119 -- Table structure for table `pma_table_coords`
122 ALTER TABLE `pma_table_coords`
123 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
125 ALTER TABLE `pma_table_coords`
126 CHANGE `db_name` `db_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
127 ALTER TABLE `pma_table_coords`
128 CHANGE `table_name` `table_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
130 -- --------------------------------------------------------
133 -- Table structure for table `pma_table_info`
136 ALTER TABLE `pma_table_info`
137 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
139 ALTER TABLE `pma_table_info`
140 CHANGE `db_name` `db_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
141 ALTER TABLE `pma_table_info`
142 CHANGE `table_name` `table_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
143 ALTER TABLE `pma_table_info`
144 CHANGE `display_field` `display_field` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';