示例#1
0
        private void DoUpgrade()
        {
            int version = GetDBVersion();

            if (version < 0)
            {
                throw new Exception("Failed to get DB version.");
            }

            if (version == 0)
            {
                Repo.AddColumn(nameof(RawCitation), "`VolumeId` TEXT");
                version = IncrementDBVersion();
            }

            if (version == 1)
            {
                Repo.AddColumn(nameof(Volume), "`ISBN` TEXT");
                version = IncrementDBVersion();
            }
        }