Eric Bower
·
27 Mar 23
20230326_add_feed_items.sql
1CREATE TABLE IF NOT EXISTS feed_items (
2 id uuid NOT NULL DEFAULT uuid_generate_v4(),
3 post_id uuid NOT NULL,
4 guid character varying (1000) NOT NULL,
5 data jsonb NOT NULL DEFAULT '{}'::jsonb,
6 created_at timestamp without time zone NOT NULL DEFAULT NOW(),
7 CONSTRAINT feed_items_pkey PRIMARY KEY (id),
8 CONSTRAINT fk_feed_items_posts
9 FOREIGN KEY(post_id)
10 REFERENCES posts(id)
11 ON DELETE CASCADE
12 ON UPDATE CASCADE
13);