mirror of
1
Fork 0
forgejo/models/db
zeripath e6e3b212b3
Run Migrate in Install rather than just SyncTables (#17475)
* Run Migrate in Install rather than just SyncTables

The underlying problem in #17328 appears to be that users are re-running the install
page during upgrades. The function that tests and creates the db did not intend for
this and thus instead the migration scripts being run - a simple sync tables occurs.

This then causes a weird partially migrated DB which causes, in this release cycle,
the duplicate column in task table error. It is likely the cause of some weird
partial migration errors in other cycles too.

This PR simply ensures that the migration scripts are also run at this point too.

Fix #17328

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-10-29 09:23:10 +01:00
..
context.go Ensure that git daemon export ok is created for mirrors (#17243) 2021-10-13 20:47:02 +01:00
convert.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
engine.go Run Migrate in Install rather than just SyncTables (#17475) 2021-10-29 09:23:10 +01:00
index.go Fix commit status index problem (#17061) 2021-09-23 18:50:06 +08:00
list_options.go Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
list_options_test.go Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
log.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
main_test.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
sequence.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
sql_postgres_with_schema.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
store.go Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
test_fixtures.go Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
unit_tests.go Save and view issue/comment content history (#16909) 2021-10-10 18:40:03 -04:00