[banshee] Re-added CoreSmartPlaylistEntriesIndex



commit 55164d94342ac54e724eeb66d1ce567d90f88da6
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date:   Mon Aug 10 10:41:04 2009 +1000

    Re-added CoreSmartPlaylistEntriesIndex
    
    The index is still necessary for shuffle by rating/score, see comments
    31-32 in bgo#565767.

 .../Banshee.Database/BansheeDbFormatMigrator.cs    |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs b/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
index 7c3bf20..51970ea 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 = 33;
+        protected const int CURRENT_VERSION = 34;
         protected const int CURRENT_METADATA_VERSION = 6;
         
 #region Migration Driver
@@ -778,6 +778,17 @@ namespace Banshee.Database
 
 #endregion
 
+#region Version 34
+
+        [DatabaseVersion (34)]
+        private bool Migrate_34 ()
+        {
+            Execute ("CREATE INDEX IF NOT EXISTS CoreSmartPlaylistEntriesIndex ON CoreSmartPlaylistEntries(SmartPlaylistID, TrackID)");
+            return true;
+        }
+
+#endregion
+
 #pragma warning restore 0169
         
 #region Fresh database setup
@@ -965,6 +976,7 @@ namespace Banshee.Database
                     TrackID             INTEGER NOT NULL
                 )
             ");
+            Execute ("CREATE INDEX CoreSmartPlaylistEntriesIndex ON CoreSmartPlaylistEntries(SmartPlaylistID, TrackID)");
 
             Execute(@"
                 CREATE TABLE CoreRemovedTracks (



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