v5.dart 520 B

12345678910111213141516171819
  1. import 'package:vitalapp/database/db.dart';
  2. import 'base.dart';
  3. class DatabasePatchV5 extends BaseDatabasePatch {
  4. DatabasePatchV5(super.database);
  5. @override
  6. int get targetVersion => 4;
  7. @override
  8. Future<void> executeTask() async {
  9. // patient表新增字段
  10. await db.database.execute(
  11. 'ALTER TABLE patients ADD COLUMN gxyFollowUpCount INTEGER NOT NULL DEFAULT 0;');
  12. await db.database.execute(
  13. 'ALTER TABLE patients ADD COLUMN tnbFollowUpCount INTEGER NOT NULL DEFAULT 0;');
  14. }
  15. }