gitea/models/migrations
zeripath d285905826
Update the webauthn_credential_id_sequence in Postgres () ()
Backport 

There is (yet) another problem with v210 in that Postgres will silently allow preset
ID insertions ... but it will not update the sequence value.

This PR simply adds a little step to the end of the v210 migration to update the
sequence number.

Users who have already migrated who find that they cannot insert new
webauthn_credentials into the DB can either run:

```bash
gitea doctor recreate-table webauthn_credential
```

or

```bash
SELECT setval('webauthn_credential_id_seq', COALESCE((SELECT MAX(id)+1 FROM `webauthn_credential`), 1), false)
```

which will fix the bad sequence.

Fix 

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

Co-authored-by: 6543 <6543@obermui.de>
2022-03-13 12:02:19 +08:00
..
fixtures Attempt to fix the webauthn migration again - part 3 () () 2022-02-16 21:15:49 +00:00
migrations.go Fix page and missing return on unadopted repos API () () 2022-02-27 20:18:23 +08:00
migrations_test.go Remove `ioutil` () 2022-01-10 09:48:13 +08:00
testlogger_test.go Add an abstract json layout to make it's easier to change json library () 2021-07-24 18:03:58 +02:00
v70.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v71.go Use single shared random string generation function () 2021-05-10 07:45:17 +01:00
v72.go
v73.go
v74.go
v75.go
v76.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v77.go
v78.go
v79.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v80.go
v81.go Upgrade xorm to v1.0.0 () 2020-03-22 11:12:55 -04:00
v82.go Migrations (v82,v96,v99,v136) remove dependencies () 2020-07-22 09:27:22 -05:00
v83.go
v84.go
v85.go Use single shared random string generation function () 2021-05-10 07:45:17 +01:00
v86.go
v87.go
v88.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v89.go
v90.go
v91.go
v92.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v93.go
v94.go
v95.go
v96.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v97.go
v98.go
v99.go Migrations (v82,v96,v99,v136) remove dependencies () 2020-07-22 09:27:22 -05:00
v100.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v101.go
v102.go Use transaction in V102 migration () 2020-08-06 19:16:49 +01:00
v103.go
v104.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v105.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v106.go
v107.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v108.go
v109.go
v110.go Upgrade xorm to v1.0.0 () 2020-03-22 11:12:55 -04:00
v111.go Move unit into models/unit/ () 2021-11-09 20:57:58 +01:00
v112.go Add a storage layer for attachments () 2020-08-18 12:23:45 +08:00
v113.go
v114.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v115.go refactor: move from io/ioutil to io and os package () 2021-09-22 13:38:34 +08:00
v116.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v117.go
v118.go
v119.go Refactor: Remove Dependencys from Migration v112-v119 () 2020-06-09 16:34:05 -04:00
v120.go
v121.go
v122.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v123.go
v124.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v125.go
v126.go
v127.go
v128.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v129.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v130.go Add an abstract json layout to make it's easier to change json library () 2021-07-24 18:03:58 +02:00
v131.go System-wide webhooks () 2020-03-09 00:08:05 +02:00
v132.go Allow to set protected file patterns that can not be changed under no conditions () 2020-03-27 00:26:34 +02:00
v133.go make avatar lookup occur at image request () 2020-03-27 14:34:39 +02:00
v134.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v135.go Add Organization Wide Labels () 2020-04-01 01:14:46 -03:00
v136.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v137.go Prevent merge of outdated PRs on protected branches () 2020-04-16 22:00:36 -03:00
v138.go Add a way to mark Conversation (code comment) resolved () 2020-04-18 10:50:25 -03:00
v139.go Fix issue ref migration () 2020-05-15 15:05:18 +01:00
v140.go Change language statistics to save size instead of percentage () 2020-05-30 10:46:15 +03:00
v141.go Fix migration v141 () 2021-01-28 23:58:33 +01:00
v142.go A better go code formatter, and now `make fmt` can run in Windows () 2021-11-17 20:34:35 +08:00
v143.go Decrease the num_stars when deleting a repo () 2020-07-07 15:16:34 -04:00
v144.go A better go code formatter, and now `make fmt` can run in Windows () 2021-11-17 20:34:35 +08:00
v145.go Fix Migration 145 on MSSQL if varchar is changed to nvarchar () 2020-08-10 16:01:10 +03:00
v146.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v147.go Fix various documentation, user-facing, and source comment typos () 2021-07-08 13:38:13 +02:00
v148.go [BugFix] Fix comment broken issue ref dependence () 2020-09-04 09:36:56 +08:00
v149.go Add Created & Updated to Milestone () 2020-09-05 13:38:54 -04:00
v150.go Add Primary Key to Topic and RepoTopic () 2020-09-10 20:45:01 +01:00
v151.go Add migration for password algorithm change () 2020-09-15 18:02:41 -04:00
v152.go Add configurable Trust Models () 2020-09-20 00:44:55 +08:00
v153.go Add team support for review request () 2020-10-12 20:55:13 +01:00
v154.go Save TimeStamps for Star, Label, Follow, Watch and Collaboration to Database () 2020-10-12 20:01:57 -04:00
v155.go [Enhancement] Allow admin to merge pr with protected file changes () 2020-10-13 14:50:57 -04:00
v156.go Tagger can be empty, as can Commit and Author - tolerate this () 2021-05-12 01:11:42 -04:00
v157.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v158.go chore(models): rewrite code format. () 2021-03-14 19:52:12 +01:00
v159.go Include OriginalAuthor in Reaction constraint () 2020-11-10 22:37:11 +00:00
v160.go Add block on official review requests branch protection () 2020-11-28 21:30:46 +02:00
v161.go Fix database keyword quote problem on migration v161 () 2021-11-05 00:47:01 +02:00
v162.go Add support for corporate WeChat webhooks () 2021-07-23 12:41:27 +08:00
v163.go Change topic name size from 25 to 50 () 2020-12-26 23:28:47 +00:00
v164.go Minimal OpenID Connect implementation () 2021-01-02 00:33:27 +08:00
v165.go Fix wrong type on hooktask to convert typ from char(16) to varchar(16) () 2021-01-06 16:11:23 +01:00
v166.go Remove unused commit () 2021-02-20 15:02:39 +01:00
v167.go Redirect on changed user and org name () 2021-01-24 16:23:05 +01:00
v168.go noop () 2021-01-29 23:52:13 +08:00
v169.go Use OldRef instead of CommitSHA for DeleteBranch comments () 2021-02-08 11:09:14 +08:00
v170.go Add dismiss review feature () 2021-02-11 18:32:25 +01:00
v171.go Add v171 (addSortingColToProjectBoard) migration for () 2021-02-12 13:01:26 +02:00
v172.go v172 migration adds created_unix field instead of expiry () 2021-04-13 20:04:17 -04:00
v173.go Add UI to delete tracked times () 2021-02-19 12:52:11 +02:00
v174.go Delete Labels & IssueLabels on Repo Delete too () 2021-03-19 21:01:24 +02:00
v175.go A better go code formatter, and now `make fmt` can run in Windows () 2021-11-17 20:34:35 +08:00
v176.go Create Proper Migration Tests () 2021-03-24 19:27:22 +01:00
v176_test.go Create Proper Migration Tests () 2021-03-24 19:27:22 +01:00
v177.go Create Proper Migration Tests () 2021-03-24 19:27:22 +01:00
v177_test.go A better go code formatter, and now `make fmt` can run in Windows () 2021-11-17 20:34:35 +08:00
v178.go Add LFS Migration and Mirror () 2021-04-08 18:25:57 -04:00
v179.go OAuth2 auto-register () 2021-04-14 14:02:12 +02:00
v180.go Add an abstract json layout to make it's easier to change json library () 2021-07-24 18:03:58 +02:00
v181.go Rework repository archive () 2021-06-23 17:12:38 -04:00
v181_test.go Always store primary email address into email_address table and also the state () 2021-06-08 11:52:51 +08:00
v182.go Add primary_key to issue_index () 2021-08-25 09:42:51 +01:00
v182_test.go Add primary_key to issue_index () 2021-08-25 09:42:51 +01:00
v183.go Add push to remote mirror repository () 2021-06-14 19:20:43 +02:00
v184.go Check if column exist before rename if exist, just return with no error () 2021-12-02 21:17:24 +08:00
v185.go Rework repository archive () 2021-06-23 17:12:38 -04:00
v186.go Add tag protection () 2021-06-25 16:28:55 +02:00
v187.go Refactor Webhook + Add X-Hub-Signature () 2021-06-27 20:21:09 +01:00
v188.go Add option to provide signature for a token to verify key ownership () 2021-07-13 15:28:07 +02:00
v189.go Add an abstract json layout to make it's easier to change json library () 2021-07-24 18:03:58 +02:00
v189_test.go Add an abstract json layout to make it's easier to change json library () 2021-07-24 18:03:58 +02:00
v190.go Add agit flow support in gitea () 2021-07-28 17:42:56 +08:00
v191.go A better go code formatter, and now `make fmt` can run in Windows () 2021-11-17 20:34:35 +08:00
v192.go Add primary_key to issue_index () 2021-08-25 09:42:51 +01:00
v193.go Add repo_id for attachment () 2021-09-08 17:19:30 +02:00
v193_test.go Add repo_id for attachment () 2021-09-08 17:19:30 +02:00
v194.go Support unprotected file patterns () 2021-09-11 16:21:17 +02:00
v195.go Fix commit status index problem () 2021-09-23 18:50:06 +08:00
v195_test.go Fix commit status index problem () 2021-09-23 18:50:06 +08:00
v196.go Kanban colored boards () 2021-09-29 22:53:12 +02:00
v197.go Add a simple way to rename branch like gh () 2021-10-08 19:03:04 +02:00
v198.go Save and view issue/comment content history () 2021-10-10 18:40:03 -04:00
v199.go Refactor update checker to use AppState () 2021-10-21 17:10:49 +01:00
v200.go Sync gitea app path for git hooks and authorized keys when starting () 2021-10-21 17:22:43 +08:00
v201.go Refactor update checker to use AppState () 2021-10-21 17:10:49 +01:00
v202.go Add support for ssh commit signing () 2021-12-19 00:37:18 -05:00
v203.go Support sorting for project board issuses () 2021-12-08 14:57:18 +08:00
v204.go Migration 204 use Sync2 () 2021-12-20 18:58:38 +01:00
v205.go Increase Salt randomness () 2022-01-04 15:13:52 +00:00
v206.go Team permission allow different unit has different permission () 2022-01-05 11:37:00 +08:00
v207.go Attempt to fix the webauthn migration again - part 3 () () 2022-02-16 21:15:49 +00:00
v208.go Attempt to fix the webauthn migration again - part 3 () () 2022-02-16 21:15:49 +00:00
v209.go Attempt to fix the webauthn migration again - part 3 () () 2022-02-16 21:15:49 +00:00
v210.go Update the webauthn_credential_id_sequence in Postgres () () 2022-03-13 12:02:19 +08:00
v210_test.go Fix page and missing return on unadopted repos API () () 2022-02-27 20:18:23 +08:00