v1.1: Add weekly introductions
- Create a new migration adding a Weeks table, allowing for new weekly introductions and paving the way for multiple week handling. - Add route to update the weekly introduction - Move the week rendering to a specific week file - Update the templates to use the week number from the week data - Update templates to render and edit weekly introductions
This commit is contained in:
parent
9911895b5b
commit
67ce54e992
12 changed files with 165 additions and 71 deletions
10
db/03_create-week-table.sql
Normal file
10
db/03_create-week-table.sql
Normal file
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE IF NOT EXISTS Weeks (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
number INTEGER NOT NULL CHECK (number > 0),
|
||||
is_last_week INTEGER NOT NULL,
|
||||
rendered_text VARCHAR NOT NULL,
|
||||
raw_text VARCHAR NOT NULL
|
||||
);
|
||||
|
||||
-- This is to upgrade from version 1.0 to 1.1 with an existing database
|
||||
INSERT INTO Weeks (number, is_last_week, rendered_text, raw_text) VALUES (1, 1, "", "");
|
Loading…
Add table
Add a link
Reference in a new issue