migration wip, minor fixes scheme

This commit is contained in:
2021-08-23 11:44:46 +03:00
parent 8cef32c7a4
commit 9343f784b4
12 changed files with 1106 additions and 69 deletions

View File

@@ -1,10 +1,10 @@
from html2md import Converter
# from html2md import Converter
import datetime
markdown = Converter()
# markdown = Converter()
def migrate(entry):
```
'''
# is comment
type Shout {
org: String!
@@ -25,12 +25,12 @@ def migrate(entry):
visibleForRoles: [String] # role ids are strings
visibleForUsers: [Int]
}
```
'''
# TODO: implement comments migration
return {
'org': 'discours.io',
'slug': entry['slug'],
'createdAt': entry['createdAt'],
'body': markdown.feed(entry['body']),
'body': html2text(entry['body']),
'replyTo': entry['']
}