From 300340218b030671620b05b0aecb973ab50b4035 Mon Sep 17 00:00:00 2001 From: Chaz Littlejohn Date: Mon, 28 Mar 2011 18:34:05 +0000 Subject: [PATCH] specifiying 'utf8' CHARSET in Players.name field not required and will lead to a conflict if mysql database created using a different utf-8 collation --- pyfpdb/SQL.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index e5b4c3d8..ee379fde 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -287,11 +287,11 @@ class Sql: if db_server == 'mysql': self.query['createPlayersTable'] = """CREATE TABLE Players ( - id INT UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY (id), - name VARCHAR(32) CHARACTER SET utf8 NOT NULL, - siteId SMALLINT UNSIGNED NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id), - comment text, - commentTs DATETIME) + id INT UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY (id), + name VARCHAR(32) NOT NULL, + siteId SMALLINT UNSIGNED NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id), + comment text, + commentTs DATETIME) ENGINE=INNODB""" elif db_server == 'postgresql': self.query['createPlayersTable'] = """CREATE TABLE Players (