repos / pico

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

pico / sql / migrations
Eric Bower · 03 Aug 22

20220422_add_desc_to_user_and_post.sql

1ALTER TABLE app_users ADD COLUMN bio character varying(150) NOT NULL DEFAULT '';
2ALTER TABLE posts ADD COLUMN description character varying(150) NOT NULL DEFAULT '';
3ALTER TABLE posts ADD COLUMN filename character varying(255);
4
5UPDATE posts SET filename = title;
6
7ALTER TABLE posts ADD CONSTRAINT unique_filename_for_user UNIQUE (user_id, filename);
8ALTER TABLE posts DROP CONSTRAINT unique_title_for_user;