-- Schema: bird__human_resources
CREATE SCHEMA IF NOT EXISTS "bird__human_resources";

-- Table: employee
CREATE TABLE "bird__human_resources"."employee" (
    "ssn" TEXT NOT NULL,
    "lastname" TEXT,
    "firstname" TEXT,
    "hiredate" TEXT,
    "salary" TEXT,
    "gender" TEXT,
    "performance" TEXT,
    "positionID" BIGINT,
    "locationID" BIGINT,
    CONSTRAINT "employee_pkey" PRIMARY KEY ("ssn")
);

-- Table: location
CREATE TABLE "bird__human_resources"."location" (
    "locationID" BIGINT NOT NULL,
    "locationcity" TEXT,
    "address" TEXT,
    "state" TEXT,
    "zipcode" BIGINT,
    "officephone" TEXT,
    CONSTRAINT "location_pk" PRIMARY KEY ("locationID")
);

-- Table: position
CREATE TABLE "bird__human_resources"."position" (
    "positionID" BIGINT NOT NULL,
    "positiontitle" TEXT,
    "educationrequired" TEXT,
    "minsalary" TEXT,
    "maxsalary" TEXT,
    CONSTRAINT "position_pk" PRIMARY KEY ("positionID")
);

-- Foreign Keys
ALTER TABLE "bird__human_resources"."employee" ADD CONSTRAINT "fk_employee_0" FOREIGN KEY ("positionID") REFERENCES "bird__human_resources"."position" ("positionID") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "bird__human_resources"."employee" ADD CONSTRAINT "fk_employee_1" FOREIGN KEY ("locationID") REFERENCES "bird__human_resources"."location" ("locationID") ON DELETE NO ACTION ON UPDATE NO ACTION;
