6543 446c06b817
Set the name Mapper in migrations (#14526) (#14529)
Migrations currently uses the default Xorm mapper which is
not the same as the mapper Gitea actually uses.

This means that there is a difference between the struct
parsing and mapping to database tables in migrations as
compared to normal Sync2.

This was the cause for the catastrophic problem in v168 -
untagged fields are not mapped in the same way in migrations
as compared to outside of migrations.

This is also likely the cause of some weird subtle failures
in other migrations as any untagged field may not be being
mapped exactly the same way.

This PR suggests that we ensure that the mapper is set at
the start of the migrations code - but also enforces a strict
clean mapper between each migration.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
2021-01-30 21:47:11 +02:00
..
2020-03-22 11:12:55 -04:00
2020-04-05 07:20:50 +01:00
2020-06-15 16:46:01 -04:00
2020-04-05 07:20:50 +01:00
2020-08-24 11:48:15 -04:00
2020-03-22 11:12:55 -04:00
2020-04-05 07:20:50 +01:00
2021-01-23 13:33:03 +02:00
2020-08-16 23:07:38 -04:00
2020-08-16 23:07:38 -04:00
2020-08-16 23:07:38 -04:00
2020-08-16 23:07:38 -04:00
2020-09-25 07:09:23 +03:00
2020-08-16 23:07:38 -04:00
2020-04-05 07:20:50 +01:00
2020-08-16 23:07:38 -04:00
2020-03-02 00:05:44 +02:00
2020-04-05 07:20:50 +01:00