From 30e9b54656ff053db17b14a017cb5a0eec752fc5 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 27 Dec 2009 22:18:20 +0100 Subject: [PATCH] [entropy.db] tell friggin user to wait when db schema is beign migrated --- libraries/entropy/db/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libraries/entropy/db/__init__.py b/libraries/entropy/db/__init__.py index 9b2d28c9a..6f03cb7c9 100644 --- a/libraries/entropy/db/__init__.py +++ b/libraries/entropy/db/__init__.py @@ -7211,6 +7211,18 @@ class EntropyRepository(EntropyRepositoryPluginStore, TextInterface): if foreign_keys is not None: continue + if not done_something: + mytxt = "%s: [%s] %s" % ( + bold(_("ATTENTION")), + purple(self.dbname), + red(_("updating repository metadata layout, please wait!")), + ) + self.updateProgress( + mytxt, + importance = 1, + type = "warning" + ) + done_something = True # need to add foreign key to this table cur = self.cursor.execute("""SELECT sql FROM sqlite_master @@ -7239,6 +7251,8 @@ class EntropyRepository(EntropyRepositoryPluginStore, TextInterface): INSERT OR REPLACE INTO settings VALUES ("on_delete_cascade", "1") """) + # recreate indexes + self.createAllIndexes() def _moveContent(self, from_table, to_table): self.cursor.execute("""