repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
159c345
parent
35dc243
author
Eric Bower
date
2022-08-18 02:42:18 +0000 UTC
fix(sql): updated posts table columns to fix regression

We did not assume mime_type or shasum could be null, so this adjusts the
migration to use what we pasted into our prod db.
1 files changed,  +2, -2
M sql/migrations/20220811_add_data_to_post.sql
+2, -2
1@@ -1,4 +1,4 @@
2-ALTER TABLE posts ADD COLUMN shasum char(64);
3-ALTER TABLE posts ADD COLUMN mime_type char(32);
4+ALTER TABLE posts ADD COLUMN shasum char(64) NOT NULL DEFAULT '';
5+ALTER TABLE posts ADD COLUMN mime_type character varying(250) NOT NULL DEFAULT '';
6 ALTER TABLE posts ADD COLUMN file_size int NOT NULL DEFAULT 0;
7 ALTER TABLE posts ADD COLUMN data jsonb NOT NULL DEFAULT '{}'::jsonb;