Refactor update checker to use AppState #17387

Merged
lunny merged 2 commits from refactor-update-checker into main 2021-10-21 16:10:49 +00:00
Contributor

We have the AppState module now, it can store app related data easily. We do not need to create separate tables for each feature.

So the update checker can use AppState instead of a one-row dedicate table.

And the code of update checker is moved from models to modules.

We have the `AppState` module now, it can store app related data easily. We do not need to create separate tables for each feature. So the update checker can use `AppState` instead of a one-row dedicate table. And the code of update checker is moved from `models` to `modules`.
delvh approved these changes 2021-10-21 14:57:37 +00:00
@ -354,3 +354,3 @@
NewMigration("Add remote version table", addRemoteVersionTable),
NewMigration("No-op (remote version is using AppState now)", addRemoteVersionTableNoop),
// v200 -> v201
NewMigration("Add table app_state", addTableAppState),
Contributor

Should suffice, shouldn't it?

```suggestion ``` Should suffice, shouldn't it?
@ -5,19 +5,10 @@
package migrations
Contributor

I would simply move the content from v200 to here.

I would simply move the content from `v200` to here.
wxiaoguang reviewed 2021-10-21 15:01:16 +00:00
@ -354,3 +354,3 @@
NewMigration("Add remote version table", addRemoteVersionTable),
NewMigration("No-op (remote version is using AppState now)", addRemoteVersionTableNoop),
// v200 -> v201
NewMigration("Add table app_state", addTableAppState),
Author
Contributor

No, if we remove it, the version will mismatch I think.

No, if we remove it, the `version` will mismatch I think.
zeripath approved these changes 2021-10-21 16:10:16 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#17387
No description provided.