Mastering Postgres

SQL Schema
DROP TABLE IF EXISTS "public"."bookmarks";

CREATE TABLE "public"."bookmarks" (
    "id" int8 NOT NULL,
    "user_id" int8,
    "url" text,
    "saved_on" date,
    PRIMARY KEY ("id")
);

DROP TABLE IF EXISTS "public"."categories";

CREATE TABLE "public"."categories" (
    "id" int8 NOT NULL,
    "name" text,
    "parent_id" int8,
    PRIMARY KEY ("id")
);

DROP TABLE IF EXISTS "public"."movies";

CREATE TABLE "public"."movies" (
    "releaseyear" int4,
    "title" text,
    "origin" text,
    "director" text,
    "casting" text,
    "genre" text,
    "wikipage" text,
    "plot" text,
    "search_vectors" tsvector
);

DROP TABLE IF EXISTS "public"."users";

CREATE TABLE "public"."users" (
    "id" int8 NOT NULL,
    "first_name" text,
    "last_name" text,
    "email" text,
    "birthday" date,
    "is_pro" bool,
    "deleted_at" timestamptz,
    "created_at" timestamptz,
    "updated_at" timestamptz,
    PRIMARY KEY ("id")
);

DROP TABLE IF EXISTS "public"."users_archive";

CREATE TABLE "public"."users_archive" (
    "id" int8 NOT NULL,
    "first_name" text,
    "last_name" text,
    "email" text,
    "birthday" date,
    "is_pro" bool,
    "deleted_at" timestamptz,
    "created_at" timestamptz,
    "updated_at" timestamptz,
    PRIMARY KEY ("id")
);