diff options
author | cel 🌸 <cel@blos.sm> | 2023-05-30 21:48:26 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-05-30 21:48:26 +0100 |
commit | 4e24495b159df0dbc4f503843c08ccd452af616a (patch) | |
tree | 9834c93fe714713b5305dbb46561d8e7154c142a /migrations | |
parent | c6378ca77f08a8aaf30fa25c4c02d151bf69edfa (diff) | |
download | blossom-4e24495b159df0dbc4f503843c08ccd452af616a.tar.gz blossom-4e24495b159df0dbc4f503843c08ccd452af616a.tar.bz2 blossom-4e24495b159df0dbc4f503843c08ccd452af616a.zip |
WIP: blog
Diffstat (limited to '')
-rw-r--r-- | migrations/20230218162011_blossom.sql | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/migrations/20230218162011_blossom.sql b/migrations/20230218162011_blossom.sql index 188bbf8..c8ed09d 100644 --- a/migrations/20230218162011_blossom.sql +++ b/migrations/20230218162011_blossom.sql @@ -33,10 +33,18 @@ create table articles ( foreign key (post_id) references posts(id) ); +create table text_formats ( + name varchar(16) not null primary key +); + +insert into text_formats (name) values ('plaintext'), ('markdown'), ('html'); + create table notes ( post_id integer not null, - content text, - foreign key (post_id) references posts(id) + text_format varchar(16) not null default ('plaintext'); + text_content text, + foreign key (post_id) references posts(id), + foreign key (text_format) references text_formats(name) ); create table media_types ( @@ -58,4 +66,4 @@ create table notes_media ( foreign key (note_id) references notes(note_id), foreign key (media_id) references media(id), primary key (note_id, media_id) -);
\ No newline at end of file +); |