trotFunky
67ce54e992
- 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
10 lines
391 B
SQL
10 lines
391 B
SQL
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, "", "");
|