Commit fd5bd59
committed
fix(db): chain users migration off c7d8e9f0a1b2; persist dev user on NO_LOGIN (#586)
Address review on #980:
- Drop obsolete merge revision f0e1d2c3b4a5; main already merges the two
embedding heads via c7d8e9f0a1b2 (#979). Second merge left two Alembic heads.
- Point users migration at c7d8e9f0a1b2 and update the Revises docstring.
Verified: flask db heads reports a single head; upgrade/downgrade/upgrade
clean on Postgres.
- NO_LOGIN dev login now upserts the User and sets session['user_id'] when
CRE_ENABLE_LOGIN is on, so local dev sessions have a row for user-scoped
endpoints. Covered by tests for flag-on and flag-off.
- Narrow login persistence except from Exception to SQLAlchemyError.1 parent 137f17e commit fd5bd59
4 files changed
Lines changed: 64 additions & 32 deletions
File tree
- application
- tests
- web
- migrations/versions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1219 | 1219 | | |
1220 | 1220 | | |
1221 | 1221 | | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
1222 | 1263 | | |
1223 | 1264 | | |
1224 | 1265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
1165 | 1166 | | |
1166 | 1167 | | |
1167 | 1168 | | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
1168 | 1184 | | |
1169 | 1185 | | |
1170 | 1186 | | |
| |||
1236 | 1252 | | |
1237 | 1253 | | |
1238 | 1254 | | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
1242 | 1260 | | |
1243 | 1261 | | |
1244 | 1262 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 0 additions & 27 deletions
This file was deleted.
0 commit comments