CREATE
DATABASE autohaendler;
\c
autohaendler

CREATE TYPE color;
CREATE TYPE make;
CREATE TYPE model;
CREATE TYPE engine;
CREATE TYPE price;
CREATE TYPE doors;

CREATE
EXTENSION IF NOT EXISTS "uuid-ossp";

CREATE TABLE autohaendler_stock
(
    id     UUID NOT NULL DEFAULT uuid_generate_v4(),
    color  TEXT NOT NULL,
    make   TEXT NOT NULL,
    model  TEXT NOT NULL,
    engine TEXT NOT NULL,
    price  TEXT NOT NULL,
    doors  TEXT NOT NULL,
);

INSERT INTO autohaendler_stock (color, make, model, engine, price, doors);
