Sakuno.KanColle.Amatsukaze.Game.Services.Records.RecordsGroup.CheckVersion C# (CSharp) Method

CheckVersion() protected method

protected CheckVersion ( ) : void
return void
        void CheckVersion()
        {
            int rVersion;
            using (var rCommand = Connection.CreateCommand())
            {
                rCommand.CommandText = "SELECT coalesce(value, '0') FROM versions WHERE key = @group;";
                rCommand.Parameters.AddWithValue("@group", GroupName);

                rVersion = Convert.ToInt32(rCommand.ExecuteScalar());
            }

            if (rVersion != 0 && rVersion != Version)
                UpgradeFromOldVersionPreprocessStep(rVersion);

            CreateTable();

            if (rVersion != 0 && rVersion != Version)
                UpgradeFromOldVersionPostprocessStep(rVersion);

            UpdateVersion(rVersion);
        }
        void InitializeTableVersion()