Use uri for permalinks, fix Micropub Location header, and drop notes.shorturl #149
Loading…
Reference in a new issue
No description provided.
Delete branch "148-permalink-uri"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #148, except the optional newbase60 follow-up, which we decided not to do.
Changes
urifor permalinks: addsuritoLikeand renamesBookmark::localUri()touri(), so every postable model usesurifor its absolute permalink here.Locationheader: likes returned the liked post's URL, and bookmarks returned an empty header becauseBookmarkhad nouri. Both now return our own page.$like->uriinstead of the hard-coded/likes/{id}.notes.shorturl: adds a migration dropping the column.Dropping
notes.shorturlThis permanently deletes data on production. The issue says the column has no non-null values, but that's only true locally. Production has 17 non-null values, on notes 1 to 17 (December 2013 to January 2014).
They are random 4-character codes from the old short domain, and nothing in the app reads them. Those short links already stopped working when the domain went, and the notes themselves aren't affected, so these are fine to lose.
Rolling back restores the column as nullable at the end of the table, but not the values.
database/schema/pgsql-schema.sqlstill listsshorturl. It's left as is because the last three migrations didn't update the dump either, and the new migration drops the column on a fresh install.Testing
Locationheader value for a like and a bookmark. The like test fails without theEntryHandlerchange. The bookmark test is fixed by the rename in5481956d.🤖 Generated with Claude Code
urifor the like and bookmark permalinks 5481956d78uriattribute in the like template 73b9668088