This repository has been archived on 2022-05-25. You can view files and clone it, but cannot push or open issues or pull requests.
elon-eats-my-tweets/sql/migrations/20220523031402_add_elon_twe...

12 lines
397 B
SQL

CREATE TABLE elon_tweets (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
twitter_id bigint NOT NULL,
text TEXT NOT NULL,
posted_at TIMESTAMP WITH TIME ZONE NOT NULL,
processed_at TIMESTAMP WITH TIME ZONE,
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
updated_at TIMESTAMP WITH TIME ZONE NOT NULL
);
CREATE UNIQUE INDEX index_elon_tweets_on_twitter_id ON elon_tweets (twitter_id);