Alex Cabal
5066252355
Use 'insert ... returning' instead of 'Db::GetLastInsertedId()'
2025-03-10 13:03:31 -05:00
Alex Cabal
7f5ffb4aea
Use shorthand assignment for basic getters
2025-02-27 16:03:26 -06:00
Mike Colagrosso
f0bfa7a43b
Rewrite DeleteUnused() queries using new indices
2024-12-31 22:31:00 -06:00
Mike Colagrosso
d6dd10be9c
Clean up unused Tags, LocSubjects, and Collections
...
On `Ebook::Save()` and `Ebook::Delete()`, remove any unreferenced `Tag`,
`LocSubject`, and `Collection` records. These are analogous to these lines in
`Ebook::Create()`:
```
$this->CreateTags();
$this->CreateLocSubjects();
$this->CreateCollections();
```
`EbookPlaceholder`s can't have `Tags` or `LocSubjects` at the moment, but other
mistakes in production that are later corrected could leave unused `Tags` and
`LocSubjects`.
Context: https://github.com/standardebooks/web/pull/447#issuecomment-2555734692
2024-12-26 12:10:13 -06:00
Alex Cabal
adfe07aad9
Add beginning of a project management system to placeholders
2024-12-14 19:13:03 -06:00
Alex Cabal
b7b63a4be5
Refactor functions out of Library
2024-11-10 23:05:31 -06:00
Alex Cabal
acb30b897c
Add PropertyFromHttp trait and update codebase to use new pattern
2024-11-10 22:23:43 -06:00
Alex Cabal
be5574eaec
Move enums into their own namespace
2024-11-08 16:34:21 -06:00
Mike Colagrosso
85307a7c7e
Standardize trim and other validation of nullable and non-nullable properties
2024-11-04 13:16:56 -06:00
Mike Colagrosso
2aae231710
EbookTag validation: Trim name and check for empty string
2024-11-04 13:16:56 -06:00
Mike Colagrosso
5b1bb2a9f0
Change tag type from string to enum (TagType)
2024-11-04 13:16:56 -06:00
Mike Colagrosso
7d8cfd351e
Ebook tags: Store UrlName so it can be queried
2024-11-04 13:16:56 -06:00
Mike Colagrosso
402dae95ff
Add a Type enum to Tags for artwork/ebook
2024-11-04 13:16:56 -06:00
Mike Colagrosso
4d321061c5
Use ::class names instead of strings in LocSubject and EbookTag
2024-11-04 13:16:56 -06:00
Mike Colagrosso
dc62553269
Remove leading slash from exceptions in lib/Exceptions
2024-11-04 13:16:56 -06:00
Mike Colagrosso
72d679a04f
Fix PHPStan errors
2024-11-04 13:16:56 -06:00
Mike Colagrosso
cc8de11ca4
Replace static GetOrCreate with GetByNameOrCreate
2024-11-04 13:16:56 -06:00
Mike Colagrosso
63d411a2e6
Initial code changes to insert/update Ebook records
2024-11-04 13:16:56 -06:00
Alex Cabal
783c09864f
Add type hints for remaining classes
2024-01-08 16:08:57 -06:00
Mike Colagrosso
6a5c05511a
Add cover art database
...
Co-authored-by: Job Curtis <job.curtis@gmail.com>
Co-authored-by: Alex Cabal <alex@standardebooks.org>
2024-01-03 19:14:04 -06:00