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.
2022-05-20 20:57:45 +00:00
|
|
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
|
|
|
|
|
|
|
CREATE TABLE users (
|
|
|
|
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
2022-05-20 22:34:20 +00:00
|
|
|
twitter_id CHARACTER VARYING(256) NOT NULL,
|
2022-05-20 20:57:45 +00:00
|
|
|
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,
|
2022-05-20 22:34:20 +00:00
|
|
|
delete_tweets_num_per_iteration int NOT NULL DEFAULT 1,
|
2022-05-20 20:57:45 +00:00
|
|
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
|
|
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL
|
2022-05-20 22:34:20 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX index_users_on_twitter_id ON users (twitter_id);
|