diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/updates/2020-08-24-reviews-nosummary.sql | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/updates/2020-08-24-reviews-nosummary.sql b/util/updates/2020-08-24-reviews-nosummary.sql new file mode 100644 index 00000000..7333a2fc --- /dev/null +++ b/util/updates/2020-08-24-reviews-nosummary.sql @@ -0,0 +1,6 @@ +ALTER TABLE reviews ADD COLUMN isfull boolean NOT NULL DEFAULT false; +UPDATE reviews SET isfull = text <> ''; +UPDATE reviews SET text = summary WHERE NOT isfull; +UPDATE reviews SET text = summary || text WHERE isfull; +ALTER TABLE reviews ALTER COLUMN isfull DROP DEFAULT; +ALTER TABLE reviews DROP COLUMN summary; |