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/20220520201518_add_users_ta...

15 lines
531 B
MySQL
Raw Normal View History

CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE users (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
twitter_id int NOT NULL,
username CHARACTER VARYING(255) NOT NULL,
name CHARACTER VARYING(255) NOT NULL,
access_token CHARACTER VARYING(512) NOT NULL,
refresh_token CHARACTER VARYING(512) NOT NULL,
delete_tweets_enabled boolean NOT NULL DEFAULT false,
delete_tweets_num_per_iteration int NOT NULL DEFAULT 0,
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
updated_at TIMESTAMP WITH TIME ZONE NOT NULL
)