When I implement SQLite data provider,some error happened

Topics: Customizing Orchard
Feb 25, 2013 at 6:08 AM
Setup failed: SQL logic error or missing database 
table "Orchard_Framework_DataMigrationRecord" has more than one primary key
Can anyone fix this?

Thanks
Coordinator
Feb 25, 2013 at 7:25 AM
On a new database?
Feb 25, 2013 at 7:52 AM
Yes, it 's completely new
Feb 25, 2013 at 7:53 AM
My implementation for sqlite
using FluentNHibernate.Cfg.Db;
using System.Data.SQLite;
using System.IO;

namespace Solarsoft.Data.Providers
{
    public class SQLiteDataServicesProvider : AbstractDataServicesProvider
    {
        private readonly string _fileName;
        private readonly string _dataFolder;
        private readonly string _connectionString;

        public SQLiteDataServicesProvider(string dataFolder, string connectionString)
        {
            _dataFolder = dataFolder;
            _connectionString = connectionString;
            _fileName = Path.Combine(_dataFolder, "Orchard.db");
        }

        public SQLiteDataServicesProvider(string fileName)
        {
            _dataFolder = Path.GetDirectoryName(fileName);
            _fileName = fileName;
        }

        public static string ProviderName
        {
            get { return "SQLite"; }
        }

        public override IPersistenceConfigurer GetPersistenceConfigurer(bool createDatabase)
        {
            var persistence = SQLiteConfiguration.Standard;

            if (createDatabase)
            {
                File.Delete(_fileName);
            }

            if (!File.Exists(_fileName))
            {
                SQLiteConnection.CreateFile(_fileName);
            }

            persistence = persistence.UsingFile(_fileName);
            return persistence;
        }
    }
}