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
)
