forked from gitea/gitea
1
0
Fork 0
gitea/models/migrations
Giteabot ecfbcced46
Prevent primary key update on migration (#26192) (#26199)
Backport #26192 by @KN4CK3R

Fixes #25918

The migration fails on MSSQL because xorm tries to update the primary
key column. xorm prevents this if the column is marked as auto
increment:

c622cdaf89/internal/statements/update.go (L38-L40)

I think it would be better if xorm would check for primary key columns
here because updating such columns is bad practice. It looks like if
that auto increment check should do the same.

fyi @lunny

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2023-07-28 11:08:11 +02:00
..
base Replace `interface{}` with `any` (#25686) (#25687) 2023-07-04 23:41:32 -04:00
fixtures Remove wrongly added column on migration test fixtures (#23456) 2023-03-14 19:49:59 +08:00
v1_6 Replace `interface{}` with `any` (#25686) (#25687) 2023-07-04 23:41:32 -04:00
v1_7 Update go dev dependencies (#22064) 2022-12-08 16:21:37 +08:00
v1_8 Replace `interface{}` with `any` (#25686) (#25687) 2023-07-04 23:41:32 -04:00
v1_9 Update go dev dependencies (#22064) 2022-12-08 16:21:37 +08:00
v1_10 Replace `interface{}` with `any` (#25686) (#25687) 2023-07-04 23:41:32 -04:00
v1_11 Fix all possible setting error related storages and added some tests (#23911) (#25244) 2023-06-14 08:36:52 +02:00
v1_12 Refactor `setting.Database.UseXXX` to methods (#23354) 2023-03-07 18:51:06 +08:00
v1_13 Remove most path-based golangci exclusions (#24214) 2023-04-19 22:08:01 -04:00
v1_14 Remove most path-based golangci exclusions (#24214) 2023-04-19 22:08:01 -04:00
v1_15 Refactor `setting.Database.UseXXX` to methods (#23354) 2023-03-07 18:51:06 +08:00
v1_16 Replace `interface{}` with `any` (#25686) (#25687) 2023-07-04 23:41:32 -04:00
v1_17 Drop migration for ForeignReference (#23605) 2023-03-23 15:01:55 -04:00
v1_18 Refactor `setting.Database.UseXXX` to methods (#23354) 2023-03-07 18:51:06 +08:00
v1_19 Replace `interface{}` with `any` (#25686) (#25687) 2023-07-04 23:41:32 -04:00
v1_20 Prevent primary key update on migration (#26192) (#26199) 2023-07-28 11:08:11 +02:00
migrations.go Redesign Scoped Access Tokens (#24767) 2023-06-04 20:57:16 +02:00