diff --git a/lib/resources/pb_type_keys.dart b/lib/resources/pb_type_keys.dart index 2356f75..1e7fcc8 100644 --- a/lib/resources/pb_type_keys.dart +++ b/lib/resources/pb_type_keys.dart @@ -1,5 +1,4 @@ class PBTypeKeys { - static const github = 'github'; static const smms = 'smms'; @@ -8,4 +7,5 @@ class PBTypeKeys { static const qiniu = 'qiniu'; -} \ No newline at end of file + static const aliyun = 'aliyun'; +} diff --git a/lib/utils/db_provider.dart b/lib/utils/db_provider.dart index 047b5c0..7bd1663 100644 --- a/lib/utils/db_provider.dart +++ b/lib/utils/db_provider.dart @@ -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) {