onUpgrade static method

FutureOr<void> onUpgrade(
  1. Database db,
  2. int oldVersion,
  3. int newVersion
)

Implementation

static FutureOr<void> onUpgrade(
  Database db,
  int oldVersion,
  int newVersion,
) async {
  if (oldVersion < 9) {
    await db.execute(
      'create table $_table('
      ' $_columnBarcode TEXT NOT NULL PRIMARY KEY ON CONFLICT REPLACE,'
      ' $_columnTags TEXT NOT NULL,'
      ' $_columnLastUpdateTimestamp INT NOT NULL'
      ')',
    );
  }
}