Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add markdown support for summary (#482)
* Add markdown support for summary * Save both md and html summary
- Loading branch information
1 parent
191eb89
commit 570d7fe
Showing
12 changed files
with
79 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
ALTER TABLE users DROP COLUMN summary_html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- Your SQL goes here | ||
ALTER TABLE users ADD COLUMN summary_html TEXT NOT NULL DEFAULT ''; | ||
UPDATE users SET summary_html = summary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
-- This file should undo anything in `up.sql` | ||
CREATE TABLE users2 ( | ||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
username VARCHAR NOT NULL, | ||
display_name VARCHAR NOT NULL DEFAULT '', | ||
outbox_url VARCHAR NOT NULL UNIQUE, | ||
inbox_url VARCHAR NOT NULL UNIQUE, | ||
is_admin BOOLEAN NOT NULL DEFAULT 'f', | ||
summary TEXT NOT NULL DEFAULT '', | ||
email TEXT, | ||
hashed_password TEXT, | ||
instance_id INTEGER REFERENCES instances(id) ON DELETE CASCADE NOT NULL, | ||
creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ap_url TEXT NOT NULL default '' UNIQUE, | ||
private_key TEXT, | ||
public_key TEXT NOT NULL DEFAULT '', | ||
shared_inbox_url VARCHAR, | ||
followers_endpoint VARCHAR NOT NULL DEFAULT '' UNIQUE, | ||
avatar_id INTEGER REFERENCES medias(id) ON DELETE SET NULL, | ||
last_fetched_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
fqn TEXT NOT NULL DEFAULT '', | ||
CONSTRAINT blog_authors_unique UNIQUE (username, instance_id) | ||
); | ||
|
||
INSERT INTO users2 SELECT | ||
id, | ||
username, | ||
display_name, | ||
outbox_url, | ||
inbox_url, | ||
is_admin, | ||
summary, | ||
email, | ||
hashed_password, | ||
instance_id, | ||
creation_date, | ||
ap_url, | ||
private_key, | ||
public_key, | ||
shared_inbox_url, | ||
followers_endpoint, | ||
avatar_id, | ||
last_fetched_date, | ||
fqn | ||
FROM users; | ||
DROP TABLE users; | ||
ALTER TABLE users2 RENAME TO users; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- Your SQL goes here | ||
ALTER TABLE users ADD COLUMN summary_html TEXT NOT NULL DEFAULT ''; | ||
UPDATE users SET summary_html = summary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters