aboutsummaryrefslogtreecommitdiffstats
path: root/migrations
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--migrations/20230218162011_blossom.sql14
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
+);