示例#1
0
        public IEnumerable <string> GetFeaturesThatNeedUpdate()
        {
            var currentVersions = OrmManager.GetAll <Tables.OrmTablesInfo>().ToDictionary(r => r.DataMigrationClass);

            var outOfDateMigrations = _dataMigrations.Where(dataMigration => {
                Tables.OrmTablesInfo record;
                if (currentVersions.TryGetValue(dataMigration.GetType().FullName, out record))
                {
                    return(CreateUpgradeLookupTable(dataMigration).ContainsKey(record.Version));
                }

                return(GetCreateMethod(dataMigration) != null);
            });

            return(outOfDateMigrations.Select(m => m.GetType().Assembly.FullName).ToList());
        }