Esempio n. 1
0
        public new void LoadVersionInfo()
        {
            base.LoadVersionInfo();

            if (StoredMigrationInfos != null)
            {
                return;
            }

            var dataSet = m_processor.ReadTableData(VersionTableMetaData.SchemaName, VersionTableMetaData.TableName);

            var storedMigrationInfos = new List <StoredMigrationInfo>();

            foreach (DataRow row in dataSet.Tables[0].Rows)
            {
                storedMigrationInfos.Add(
                    new StoredMigrationInfo(
                        (long)row[VersionTableMetaData.ColumnName],
                        (string)row[VersionTableMetaData.DescriptionColumnName],
                        (DateTime)row[VersionTableMetaData.AppliedOnColumnName]
                        )
                    );
            }

            storedMigrationInfos.Sort((a, b) => a.Version.CompareTo(b.Version));

            StoredMigrationInfos = storedMigrationInfos.ToDictionary(x => x.Version);
        }