text: CREATE TABLE "staff" (
    "id" int PRIMARY KEY,
    "first_name" varchar,
    "last_name" varchar,
    "address_id" int,
    "picture" blob,
    "email" varchar,
    "store_id" int,
    "active" boolean,
    "user_name" varchar,
    "password" varchar,
    "last_update" timestamp
  );
  
  CREATE TABLE "store" (
    "id" int PRIMARY KEY,
    "manager_staff_id" int,
    "address_id" int,
    "last_update" timestamp
  );
  
  CREATE TABLE "payment" (
    "id" int PRIMARY KEY,
    "customer_id" int,
    "staff_id" int,
    "rental_id" int,
    "amount" decimal,
    "payment_date" datetime,
    "last_update" timestamp
  );
  
  CREATE TABLE "rental" (
    "id" int PRIMARY KEY,
    "rental_date" datetime,
    "inventory_id" int,
    "customer_id" int,
    "return_date" ddatetime,
    "staff_id" int,
    "last_update" timestamp
  );
  
  ALTER TABLE "staff" ADD FOREIGN KEY ("store_id") REFERENCES "store" ("id");
  
  ALTER TABLE "store" ADD FOREIGN KEY ("manager_staff_id") REFERENCES "staff" ("id");
  
  ALTER TABLE "payment" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id");
  
  ALTER TABLE "payment" ADD FOREIGN KEY ("rental_id") REFERENCES "rental" ("id");
  
  ALTER TABLE "rental" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id");
  CREATE TABLE "country" (
    "id" int PRIMARY KEY,
    "country" varchar,
    "last_update" timestamp
  );
  
  CREATE TABLE "city" (
    "id" int PRIMARY KEY,
    "city" varchar,
    "country_id" int,
    "last_update" timestamp
  );
  
  CREATE TABLE "address" (
    "id" int PRIMARY KEY,
    "address" varchar,
    "address2" varchar,
    "district" varchar,
    "city_id" int,
    "postal_code" varchar,
    "phone" varchar,
    "last_update" timestamp
  );
  
  CREATE TABLE "customer" (
    "id" int PRIMARY KEY,
    "store_id" int,
    "first_name" varchar,
    "last_name" varchar,
    "email" varchar,
    "address_id" int,
    "active" boolean,
    "create_Date" timestamp,
    "last_update" timestamp
  );
  
  ALTER TABLE "city" ADD FOREIGN KEY ("country_id") REFERENCES "country" ("id");
  
  ALTER TABLE "address" ADD FOREIGN KEY ("city_id") REFERENCES "city" ("id");
  
  ALTER TABLE "customer" ADD FOREIGN KEY ("address_id") REFERENCES "address" ("id");
  
  CREATE INDEX ON "customer" USING BTREE ("id", "first_name");
  CREATE TABLE "category" (
    "id" int PRIMARY KEY,
    "name" varchar,
    "last_update" timestamp
  );
  
  CREATE TABLE "film_category" (
    "id" int PRIMARY KEY,
    "category_id" int,
    "last_update" timestamp
  );
  
  CREATE TABLE "language" (
    "id" int PRIMARY KEY,
    "name" varchar,
    "last_update" timestamp
  );
  
  CREATE TABLE "film_text" (
    "id" int PRIMARY KEY,
    "film_id" int,
    "title" varchar,
    "description" text
  );
  
  CREATE TABLE "actor" (
    "id" int PRIMARY KEY,
    "first_name" varchar,
    "last_name" varchar,
    "last_update" timestamp
  );
  
  CREATE TABLE "film" (
    "id" int PRIMARY KEY,
    "title" varchar,
    "description" text,
    "releaase_year" int,
    "language_id" int,
    "original_language_id" int,
    "rental_duration" int,
    "rental_rate" decimal,
    "length" int,
    "replacement_cost" decimal,
    "rating" varchar,
    "special_feature" varchar,
    "last_update" timestamp
  );
  
  CREATE TABLE "film_actor" (
    "id" int PRIMARY KEY,
    "film_id" int,
    "actor_id" int,
    "last_update" timestamp
  );
  
  CREATE TABLE "inventory" (
    "id" int PRIMARY KEY,
    "film_id" int,
    "store_id" int,
    "last_update" timestamp
  );
  
  ALTER TABLE "film_category" ADD FOREIGN KEY ("category_id") REFERENCES "category" ("id");
  
  ALTER TABLE "film_text" ADD FOREIGN KEY ("film_id") REFERENCES "inventory" ("film_id");
  
  ALTER TABLE "film" ADD FOREIGN KEY ("language_id") REFERENCES "language" ("id");
  
  ALTER TABLE "film" ADD FOREIGN KEY ("original_language_id") REFERENCES "language" ("id");
  
  ALTER TABLE "film_actor" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
  
  ALTER TABLE "film_actor" ADD FOREIGN KEY ("actor_id") REFERENCES "actor" ("id");
  
  ALTER TABLE "inventory" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
  