guidojw / arora-discord

Extensive Discord utility bot that can optionally be connected with arora-api. Used in the 6000 member Twin-Rail and 2300 member NS Roblox servers.
MIT License
6 stars 1 forks source link

feat(client): application migrations #602

Open guidojw opened 1 year ago

guidojw commented 1 year ago

Implements an application migrations system in the code, useful for e.g. migrating Discord resources after the database migrations have run. Added an activation handler on the new migration service identifier that automatically passes a query runner to the migrations, so that the client does not have to instance one.

guidojw commented 1 year ago

Chose to pass a query runner rather than using repositories as after new features/refactors, previously used repositories may not exist anymore breaking backwards compatibility. Using the query runner, this will not happen. Since the migrations are bound in the DI container, dependencies can still be injected in them if necessary.