0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 09:44:41 +01:00
gitea/models
wxiaoguang 042cac5fed
Improve install code to avoid low-level mistakes. (#17779)
* Improve install code to avoid low-level mistakes.

If a user tries to do a re-install in a Gitea database, they gets a warning and double check.
When Gitea runs, it never create empty app.ini automatically.

Also some small (related) refactoring:

* Refactor db.InitEngine related logic make it more clean (especially for the install code)
* Move some i18n strings out from setting.go to make the setting.go can be easily maintained.
* Show errors in CLI code if an incorrect app.ini is used.
* APP_DATA_PATH is created when installing, and checked when starting (no empty directory is created any more).
2021-12-01 15:50:01 +08:00
..
admin
appstate
avatars
db Improve install code to avoid low-level mistakes. (#17779) 2021-12-01 15:50:01 +08:00
fixtures
issues
login
migrations Improve install code to avoid low-level mistakes. (#17779) 2021-12-01 15:50:01 +08:00
perm Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
repo
unit
unittest Improve install code to avoid low-level mistakes. (#17779) 2021-12-01 15:50:01 +08:00
user Move more model into models/user (#17826) 2021-11-28 22:11:58 +08:00
webhook
access.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
access_test.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
action.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
action_list.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
action_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
branches.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
branches_test.go
commit.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
commit_status.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
commit_status_test.go
consistency.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
consistency_test.go
engine_test.go
error.go Move more model into models/user (#17826) 2021-11-28 22:11:58 +08:00
fixture_generation.go
fixture_test.go
gpg_key.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
gpg_key_add.go
gpg_key_commit_verification.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
gpg_key_common.go
gpg_key_import.go DBContext is just a Context (#17100) 2021-09-23 23:45:36 +08:00
gpg_key_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
gpg_key_verify.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
helper.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
helper_directory.go
helper_environment.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
issue_assignees.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_assignees_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_comment.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_comment_list.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_comment_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_dependency.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_dependency_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_label.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_label_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_list.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_list_test.go
issue_lock.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_milestone.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_milestone_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_reaction.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_reaction_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_stopwatch.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_stopwatch_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_tracked_time.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_tracked_time_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_user.go
issue_user_test.go
issue_watch.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_watch_test.go
issue_xref.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
issue_xref_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
lfs.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
lfs_lock.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
main_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
migrate.go Move more model into models/user (#17826) 2021-11-28 22:11:58 +08:00
notification.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
notification_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
org.go Move more model into models/user (#17826) 2021-11-28 22:11:58 +08:00
org_team.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
org_team_test.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
org_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
project.go
project_board.go
project_issue.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
project_test.go
protected_tag.go
protected_tag_test.go
pull.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
pull_list.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
pull_sign.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
pull_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
release.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
repo.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
repo_activity.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
repo_archiver.go
repo_avatar.go
repo_branch.go
repo_collaboration.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
repo_collaboration_test.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
repo_generate.go
repo_generate_test.go
repo_indexer.go
repo_issue.go
repo_language_stats.go
repo_list.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
repo_list_test.go
repo_mirror.go
repo_permission.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
repo_permission_test.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
repo_pushmirror.go
repo_pushmirror_test.go
repo_redirect.go
repo_redirect_test.go
repo_sign.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
repo_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
repo_transfer.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
repo_transfer_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
repo_unit.go
repo_watch.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
repo_watch_test.go
review.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
review_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
ssh_key.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
ssh_key_authorized_keys.go
ssh_key_authorized_principals.go
ssh_key_deploy.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
ssh_key_fingerprint.go
ssh_key_parse.go
ssh_key_principals.go Move accessmode into models/perm (#17828) 2021-11-28 12:58:28 +01:00
ssh_key_test.go Improve install code to avoid low-level mistakes. (#17779) 2021-12-01 15:50:01 +08:00
star.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
star_test.go
statistic.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
task.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
token.go
token_test.go
topic.go
topic_test.go
update.go
upload.go
user.go Move more model into models/user (#17826) 2021-11-28 22:11:58 +08:00
user_heatmap.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
user_heatmap_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
user_test.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
userlist.go Move more model into models/user (#17826) 2021-11-28 22:11:58 +08:00
userlist_test.go Move more model into models/user (#17826) 2021-11-28 22:11:58 +08:00
wiki.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
wiki_test.go