From 212438a0c60fe78f2cc7dd539ca4b4b296844c50 Mon Sep 17 00:00:00 2001 From: Worros Date: Fri, 4 Jun 2010 15:25:56 +0800 Subject: [PATCH] Database.py - Additional logging and comments --- pyfpdb/Database.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 23fb02fb..ce4e3f6f 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -193,7 +193,7 @@ class Database: # alter table t add constraint c foreign key (fkcol) references tab(rcol) # (fkcol is used for foreigh key name) - # mysql to list indexes: + # mysql to list indexes: (CG - "LIST INDEXES" should work too) # SELECT table_name, index_name, non_unique, column_name # FROM INFORMATION_SCHEMA.STATISTICS # WHERE table_name = 'tbl_name' @@ -223,6 +223,7 @@ class Database: # Note: index names must be unique across a schema # CREATE INDEX idx ON tab(col) # DROP INDEX idx + # SELECT * FROM PG_INDEXES # SQLite notes: @@ -1075,7 +1076,7 @@ class Database: c = self.get_cursor() c.execute(self.sql.query['createSettingsTable']) - log.debug(self.sql.query['createSitesTable']) + log.debug("Creating tables") c.execute(self.sql.query['createSitesTable']) c.execute(self.sql.query['createGametypesTable']) c.execute(self.sql.query['createPlayersTable']) @@ -1088,7 +1089,8 @@ class Database: c.execute(self.sql.query['createHandsActionsTable']) c.execute(self.sql.query['createHudCacheTable']) - # create unique indexes: + # Create unique indexes: + log.debug("Creating unique indexes") c.execute(self.sql.query['addTourneyIndex']) c.execute(self.sql.query['addHandsIndex']) c.execute(self.sql.query['addPlayersIndex'])