Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChirayu Chiripal <chirayu.chiripal@gmail.com>2014-06-28 16:27:18 +0400
committerChirayu Chiripal <chirayu.chiripal@gmail.com>2014-07-12 00:22:32 +0400
commit1f324be4b12c854b26ece2517c425b41053525ec (patch)
tree8b678ae49fdc46d504735086c10563611c8900c9 /examples
parent43f3179db6429c777e10e611f7c525cd992036f6 (diff)
RFE-637: Custom field handlers (input transformations)
Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/create_tables.sql2
-rw-r--r--examples/create_tables_drizzle.sql2
-rw-r--r--examples/upgrade_column_info_4_3_0+.sql47
3 files changed, 51 insertions, 0 deletions
diff --git a/examples/create_tables.sql b/examples/create_tables.sql
index f1762f3255..102a585e03 100644
--- a/examples/create_tables.sql
+++ b/examples/create_tables.sql
@@ -62,6 +62,8 @@ CREATE TABLE IF NOT EXISTS `pma__column_info` (
`mimetype` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`transformation` varchar(255) NOT NULL default '',
`transformation_options` varchar(255) NOT NULL default '',
+ `input_transformation` varchar(255) NOT NULL default '',
+ `input_transformation_options` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
)
diff --git a/examples/create_tables_drizzle.sql b/examples/create_tables_drizzle.sql
index 29d4626134..4bce72f2d8 100644
--- a/examples/create_tables_drizzle.sql
+++ b/examples/create_tables_drizzle.sql
@@ -49,6 +49,8 @@ CREATE TABLE IF NOT EXISTS `pma__column_info` (
`mimetype` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
`transformation` varchar(255) NOT NULL default '',
`transformation_options` varchar(255) NOT NULL default '',
+ `input_transformation` varchar(255) NOT NULL default '',
+ `input_transformation_options` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
)
diff --git a/examples/upgrade_column_info_4_3_0+.sql b/examples/upgrade_column_info_4_3_0+.sql
new file mode 100644
index 0000000000..b5bdc0c1fe
--- /dev/null
+++ b/examples/upgrade_column_info_4_3_0+.sql
@@ -0,0 +1,47 @@
+-- -------------------------------------------------------------
+-- SQL Commands to upgrade pmadb.pma__column_info table
+-- for normal phpMyAdmin operation
+--
+-- This file is meant for use with phpMyAdmin 4.3.0 and above!
+-- For older releases, please use create_tables.sql
+--
+-- Please don't forget to set up the table names in config.inc.php
+--
+
+-- --------------------------------------------------------
+
+--
+-- Database : `phpmyadmin`
+--
+USE `phpmyadmin`;
+
+-- --------------------------------------------------------
+
+--
+-- Update table structure for table `pma__column_info`
+--
+UPDATE `pma__column_info`
+ SET `mimetype` = REPLACE(`mimetype`, 'octet-stream', 'octetstream');
+UPDATE `pma__column_info`
+ SET `transformation` = REPLACE(REPLACE(`transformation`, '__', '_'), 'inc.php', 'class.php');
+UPDATE `pma__column_info`
+ SET `transformation` = ''
+ WHERE `transformation` = '_';
+UPDATE `pma__column_info`
+ SET `transformation` = CONCAT('output/', `transformation`)
+ WHERE `transformation` IN (
+ 'application_octetstream_download.class.php',
+ 'application_octetstream_hex.class.php',
+ 'image_jpeg_inline.class.php',
+ 'image_jpeg_link.class.php',
+ 'image_png_inline.class.php',
+ 'text_plain_bool2text.class.php',
+ 'text_plain_dateformat.class.php',
+ 'text_plain_external.class.php',
+ 'text_plain_formatted.class.php',
+ 'text_plain_imagelink.class.php',
+ 'text_plain_sql.class.php'
+ );
+ALTER TABLE `pma__column_info`
+ ADD `input_transformation` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+ ADD `input_transformation_options` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';