diff --git a/deploy.sh b/deploy.sh index 38d6828..64d8686 100755 --- a/deploy.sh +++ b/deploy.sh @@ -3,6 +3,15 @@ set -ex ./flutter/bin/flutter test +dart run drift_dev schema dump lib/database.dart drift_schemas +dart run drift_dev schema steps drift_schemas/ lib/database/schema_versions.dart + +if [[ -n "$(git ls-files --others --exclude-standard)" ]]; then + echo "There are unstaged changes in the repository:" + git --no-pager diff + exit 1 +fi + ./screenshots.sh "phoneScreenshots" ./screenshots.sh "sevenInchScreenshots" ./screenshots.sh "tenInchScreenshots" @@ -29,13 +38,10 @@ git add fastlane/metadata if [[ -n "$(git ls-files --others --exclude-standard)" ]]; then echo "There are unstaged changes in the repository:" git --no-pager diff - git restore --staged pubspec.yaml fastlane/metadata - git restore pubspec.yaml fastlane/metadata - rm "fastlane/metadata/android/en-US/changelogs/$changelog_number.txt" exit 1 fi - ./flutter/bin/flutter build apk --split-per-abi + ./flutter/bin/flutter build apk ./flutter/bin/flutter build appbundle mkdir -p build/native_assets/linux diff --git a/lib/database.dart b/lib/database.dart index c2caf59..057c300 100644 --- a/lib/database.dart +++ b/lib/database.dart @@ -47,12 +47,7 @@ class AppDatabase extends _$AppDatabase { from3To4: (m, schema) async { await m.alterTable(TableMigration(schema.entries)); }, - from4To5: (m, schema) async { - // await m.addColumn(entries, entries.kCalories); - // await m.addColumn(entries, entries.proteinG); - // await m.addColumn(entries, entries.fatG); - // await m.addColumn(entries, entries.carbG); - }, + from4To5: (m, schema) async {}, from5To6: (m, schema) async { await m.createIndex( Index(