Blacker.MangaScraper.Library.SQLite.SchemaManager.GetSchemaVersion C# (CSharp) Method

GetSchemaVersion() private method

Get schema version
private GetSchemaVersion ( SQLiteConnection connection ) : long
connection System.Data.SQLite.SQLiteConnection Connection to use
return long
        private long GetSchemaVersion(SQLiteConnection connection)
        {
            try
            {
                using (var command = new SQLiteCommand(@"PRAGMA user_version;", connection))
                {
                    return (long)command.ExecuteScalar();
                }
            }
            catch (Exception ex)
            {
                _log.Error("Unable to load schema version.", ex);
                return 0;
            }
        }