Commit 3ff1b60
committed
fix(api): align headlines table schema with model
Updated the `headlines` table schema to allow `source_id` and
`category_id` to be nullable, which correctly reflects the optional
`source` and `category` fields in the shared `Headline` model.
Foreign key constraints have been added to these columns to maintain
referential integrity when a value is present. The database seeding
logic has also been updated to handle the potential for null values
in these fields during fixture insertion.1 parent e9ffedf commit 3ff1b60
1 file changed
+5
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | 263 | | |
274 | | - | |
275 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
276 | 267 | | |
277 | 268 | | |
278 | 269 | | |
| |||
0 commit comments