feature:upgrade sqlite version to add aliyun row

This commit is contained in:
hackycy
2020-07-08 11:11:04 +08:00
parent c95ebbaac0
commit 0dabb46dd8
2 changed files with 6 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ class DbProvider {
try {
db = await openDatabase(
path,
version: 4,
version: 5,
onCreate: (db, version) async {
// 创建pb_setting表
_initPb(db);
@@ -99,6 +99,9 @@ class DbProvider {
// Qiniu图床
await db.rawInsert(
'INSERT INTO $TABLE_NAME_PBSETTING(type, path, name, config, visible) VALUES("${PBTypeKeys.qiniu}", "/setting/pb/qiniu", "七牛图床", NULL, 1)');
// 阿里云OSS
await db.rawInsert(
'INSERT INTO $TABLE_NAME_PBSETTING(type, path, name, config, visible) VALUES("${PBTypeKeys.aliyun}", "/setting/pb/aliyun", "阿里云OSS图床", NULL, 1)');
// copy data
// update authors set dynasty_index=(select id from dynasties where dynasties .name=authors.dynasty) where dynasty in (select name from dynasties )
if (isExists) {