forgejo/models
Giteabot c4f569b9a5
Support converting varchar to nvarchar for mssql database (#24105) (#24168)
Backport #24105 by @lunny

In #12269, all string fields of struct will generate a NVARCHAR column
in database, but for those Gitea instances installed before that PR,
users have to convert columns themselves.

In this PR, we update the `./gitea admin convert` commands to support
both MySQL and MSSQL database converting. Previously, it only supported
converting `utf8 -> utf8mb4` for MySQL.
Now, it will check the database types.
If it's MSSQL, it will convert `VARCHAR -> NVARCHAR` as well.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-04-17 10:10:15 -04:00
..
actions Fix checks for needs in Actions (#23789) (#23831) 2023-04-03 13:24:45 +08:00
activities Refactor setting.Database.UseXXX to methods (#23354) (#23356) 2023-03-07 20:11:44 +08:00
admin Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
asymkey Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
auth Fix 500 error if there is a name conflict when edit authentication source (#23832) (#23852) 2023-03-31 12:53:25 -04:00
avatars Avoid warning for system setting when start up (#23054) (#23116) 2023-02-24 16:46:11 -05:00
db Support converting varchar to nvarchar for mssql database (#24105) (#24168) 2023-04-17 10:10:15 -04:00
dbfs Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
fixtures Support "." char as user name for User/Orgs in RSS/ATOM/GPG/KEYS path ... (#23874) (#23878) 2023-04-07 18:10:17 +08:00
git Fix branch protection priority (#24045) (#24061) 2023-04-11 21:07:38 +02:00
issues Fix cannot reopen after pushing commits to a closed PR (#23189) (#23324) 2023-03-07 18:47:23 +08:00
migrations Drop migration for ForeignReference (#23605) (#23666) 2023-03-24 16:57:00 -04:00
organization Add missing tabs to org projects page (#22705) (#23412) 2023-03-10 10:08:28 -06:00
packages Use ghost user if package creator does not exist (#23822) (#23915) 2023-04-04 20:37:28 +08:00
perm Rename repo.GetOwner to repo.LoadOwner (#22967) 2023-02-18 20:11:03 +08:00
project Refactor setting.Database.UseXXX to methods (#23354) (#23356) 2023-03-07 20:11:44 +08:00
pull refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
repo Sort repo topic labels by name (#24123) (#24153) 2023-04-17 09:00:19 +08:00
secret Secrets storage with SecretKey encrypted (#22142) 2022-12-20 17:07:13 +08:00
system Avoid warning for system setting when start up (#23054) (#23116) 2023-02-24 16:46:11 -05:00
unit Rename actions unit to repo.actions and add docs for it (#23733) (#23881) 2023-04-03 12:54:36 +02:00
unittest Refactor setting.Database.UseXXX to methods (#23354) (#23356) 2023-03-07 20:11:44 +08:00
user Support "." char as user name for User/Orgs in RSS/ATOM/GPG/KEYS path ... (#23874) (#23878) 2023-04-07 18:10:17 +08:00
webhook Support system hook API (#14537) 2023-01-28 19:12:10 +01:00
error.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
main_test.go Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
migrate.go Check primary keys for all tables and drop ForeignReference (#21721) 2022-12-23 19:35:43 +08:00
migrate_test.go Check primary keys for all tables and drop ForeignReference (#21721) 2022-12-23 19:35:43 +08:00
org.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
org_team.go Supports wildcard protected branch (#20825) 2023-01-16 16:00:22 +08:00
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
org_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo.go Avoid warning for system setting when start up (#23054) (#23116) 2023-02-24 16:46:11 -05:00
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
repo_collaboration_test.go Rename repo.GetOwner to repo.LoadOwner (#22967) 2023-02-18 20:11:03 +08:00
repo_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_transfer.go Always reuse transaction (#22362) 2023-01-08 09:34:58 +08:00
repo_transfer_test.go Rename almost all Ctx functions (#22071) 2022-12-10 10:46:31 +08:00