[40387] trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
jmpp at macports.org
jmpp at macports.org
Tue Sep 30 00:35:43 PDT 2008
Revision: 40387
http://trac.macports.org/changeset/40387
Author: jmpp at macports.org
Date: 2008-09-30 00:35:42 -0700 (Tue, 30 Sep 2008)
Log Message:
-----------
It doesn't really matter as we don't have any Portfiles with non-ascii characters, as far as I've been able to see...
But stil, since we operate fully on utf8 mode when reading the Portfiles, we might as well store them as such in the db.
PS: As far as I'm aware, changes to this script require manual reinstallation, as our Makefiles don't install it by default.
PSS: Once reinstalled and the new, fully utf8 tables have been created, a "mysql_set_charset('utf8',$portsdb_connection);"
instruction would be appropriate in the else block of the portsdb_connect() function in trunk/www/includes/common.inc.
Modified Paths:
--------------
trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
Modified: trunk/base/portmgr/jobs/PortIndex2MySQL.tcl
===================================================================
--- trunk/base/portmgr/jobs/PortIndex2MySQL.tcl 2008-09-30 07:28:05 UTC (rev 40386)
+++ trunk/base/portmgr/jobs/PortIndex2MySQL.tcl 2008-09-30 07:35:42 UTC (rev 40387)
@@ -234,25 +234,25 @@
# Initial creation of database tables: log, portfiles, categories, maintainers, dependencies, variants and platforms.
# Do we need any other?
puts $sqlfile_fd "DROP TABLE IF EXISTS log;"
-puts $sqlfile_fd "CREATE TABLE log (activity VARCHAR(255), activity_time TIMESTAMP(14));"
+puts $sqlfile_fd "CREATE TABLE log (activity VARCHAR(255), activity_time TIMESTAMP(14)) DEFAULT CHARSET=utf8;"
puts $sqlfile_fd "DROP TABLE IF EXISTS portfiles;"
-puts $sqlfile_fd "CREATE TABLE portfiles (name VARCHAR(255) PRIMARY KEY NOT NULL, path VARCHAR(255), version VARCHAR(255), description TEXT);"
+puts $sqlfile_fd "CREATE TABLE portfiles (name VARCHAR(255) PRIMARY KEY NOT NULL, path VARCHAR(255), version VARCHAR(255), description TEXT) DEFAULT CHARSET=utf8;"
puts $sqlfile_fd "DROP TABLE IF EXISTS categories;"
-puts $sqlfile_fd "CREATE TABLE categories (portfile VARCHAR(255), category VARCHAR(255), is_primary INTEGER);"
+puts $sqlfile_fd "CREATE TABLE categories (portfile VARCHAR(255), category VARCHAR(255), is_primary INTEGER) DEFAULT CHARSET=utf8;"
puts $sqlfile_fd "DROP TABLE IF EXISTS maintainers;"
-puts $sqlfile_fd "CREATE TABLE maintainers (portfile VARCHAR(255), maintainer VARCHAR(255), is_primary INTEGER);"
+puts $sqlfile_fd "CREATE TABLE maintainers (portfile VARCHAR(255), maintainer VARCHAR(255), is_primary INTEGER) DEFAULT CHARSET=utf8;"
puts $sqlfile_fd "DROP TABLE IF EXISTS dependencies;"
-puts $sqlfile_fd "CREATE TABLE dependencies (portfile VARCHAR(255), library VARCHAR(255));"
+puts $sqlfile_fd "CREATE TABLE dependencies (portfile VARCHAR(255), library VARCHAR(255)) DEFAULT CHARSET=utf8;"
puts $sqlfile_fd "DROP TABLE IF EXISTS variants;"
-puts $sqlfile_fd "CREATE TABLE variants (portfile VARCHAR(255), variant VARCHAR(255));"
+puts $sqlfile_fd "CREATE TABLE variants (portfile VARCHAR(255), variant VARCHAR(255)) DEFAULT CHARSET=utf8;"
puts $sqlfile_fd "DROP TABLE IF EXISTS platforms;"
-puts $sqlfile_fd "CREATE TABLE platforms (portfile VARCHAR(255), platform VARCHAR(255));"
+puts $sqlfile_fd "CREATE TABLE platforms (portfile VARCHAR(255), platform VARCHAR(255)) DEFAULT CHARSET=utf8;"
# Iterate over each matching port, extracting its information from the
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080930/4d857237/attachment.html
More information about the macports-changes
mailing list