v1.4 - added admin page and auth
This commit is contained in:
parent
5efdafbb97
commit
1f0aa3078f
29 changed files with 5264 additions and 217 deletions
28
server/src/migrations/005_person_bio.sql
Normal file
28
server/src/migrations/005_person_bio.sql
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-- ═══════════════════════════════════════════════════════════════
|
||||
-- Person bio and primary organization
|
||||
--
|
||||
-- bio is one run of prose, not orderable mixed content, so it does
|
||||
-- not belong in content_blocks — whose owner_kind CHECK would need
|
||||
-- a full table rebuild to accept 'person' anyway. Paragraphs are
|
||||
-- blank-line separated and split at render time.
|
||||
--
|
||||
-- primary_org_id is nullable on purpose: plenty of people have no
|
||||
-- home organization worth printing, and ON DELETE SET NULL means
|
||||
-- deleting an org blanks the reference rather than blocking the
|
||||
-- delete or leaving a dangling id behind.
|
||||
--
|
||||
-- Check the current version before renumbering this file:
|
||||
-- PRAGMA user_version;
|
||||
-- ═══════════════════════════════════════════════════════════════
|
||||
|
||||
ALTER TABLE people ADD COLUMN bio TEXT;
|
||||
|
||||
-- SQLite requires an added REFERENCES column to default to NULL,
|
||||
-- which is what we want regardless.
|
||||
ALTER TABLE people ADD COLUMN primary_org_id TEXT
|
||||
REFERENCES organizations (id) ON DELETE SET NULL;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS people_primary_org
|
||||
ON people (primary_org_id);
|
||||
|
||||
PRAGMA user_version = 0; -- ← set to this migration's number
|
||||
Loading…
Add table
Add a link
Reference in a new issue