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 · 13 Mar 23

20230310_add_aliases_table.sql

 1CREATE TABLE IF NOT EXISTS post_aliases (
 2  id uuid NOT NULL DEFAULT uuid_generate_v4(),
 3  post_id uuid NOT NULL,
 4  slug character varying(255) NOT NULL,
 5  created_at timestamp without time zone NOT NULL DEFAULT NOW(),
 6  CONSTRAINT post_aliases_pkey PRIMARY KEY (id),
 7  CONSTRAINT fk_post_aliases_posts
 8    FOREIGN KEY(post_id)
 9  REFERENCES posts(id)
10  ON DELETE CASCADE
11  ON UPDATE CASCADE
12);