[banshee/podcast-ng] [database] Added database version 42!



commit 20d7edc7b265ff973ac0035b017cf4c8d58838f1
Author: Mike Urbanski <michael c urbanski gmail com>
Date:   Tue Mar 30 01:01:02 2010 -0500

    [database] Added database version 42!
    
    Added an index that makes a number of podcast-ng operations
    significantly faster.  Most noticeably, it makes switching
    from one podcast to another faster.

 .../Banshee.Database/BansheeDbFormatMigrator.cs    |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs b/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
index 93aa331..b1fde15 100644
--- a/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
+++ b/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
@@ -56,7 +56,7 @@ namespace Banshee.Database
         // NOTE: Whenever there is a change in ANY of the database schema,
         //       this version MUST be incremented and a migration method
         //       MUST be supplied to match the new version number
-        protected const int CURRENT_VERSION = 41;
+        protected const int CURRENT_VERSION = 42;
         protected const int CURRENT_METADATA_VERSION = 7;
 
 #region Migration Driver
@@ -924,6 +924,13 @@ namespace Banshee.Database
             return true;
         }
 
+        [DatabaseVersion (42)]
+        private bool Migrate_42 ()
+        {
+            Execute ("CREATE INDEX IF NOT EXISTS CoreAlbumIDIndex ON CoreAlbums (AlbumID, ArtistID)");
+            Execute ("CREATE INDEX IF NOT EXISTS CoreTracksArtistsAlbumIDIndex ON CoreTracks (AlbumID, ArtistID, ExternalID, PrimarySourceID)");
+            return true;
+        }
 
 #pragma warning restore 0169
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]