Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Explicitly build for linux/arm/v8
Browse files Browse the repository at this point in the history
Also include DB migration file
  • Loading branch information
twaslowski committed Mar 29, 2024
1 parent 31a8c29 commit e97e1f1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v8
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


17 changes: 17 additions & 0 deletions src/repository/migrate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import src.repository.user_repository as user_repository


def migrate_notifications():
"""
The data structure for metrics and notifications has changed.
This function migrates the data to the new structure by simply deleting the old user data structure
and replacing it with the new one. Every user was simply using the defaults anyhow, so no data is lost.
:return:
"""
for user in user_repository.user.find():
user_repository.user.delete_one({"user_id": user["user_id"]})
user_repository.create_user(user["user_id"])


if __name__ == "__main__":
migrate_notifications()

0 comments on commit e97e1f1

Please sign in to comment.