develop #1

Merged
vex merged 6 commits from develop into main 2024-10-13 14:09:12 +00:00
2 changed files with 44 additions and 0 deletions
Showing only changes of commit a4db6712a4 - Show all commits

27
sql/createDB.sql Normal file
View File

@ -0,0 +1,27 @@
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);

17
sql/rollbackDB.sql Normal file
View File

@ -0,0 +1,17 @@
\c
autohaendler
DROP TABLE autohaendler;
DROP TYPE IF EXISTS color;
DROP TYPE IF EXISTS make;
DROP TYPE IF EXISTS model;
DROP TYPE IF EXISTS engine;
DROP TYPE IF EXISTS price;
DROP TYPE IF EXISTS doors;
\c
postgres
DROP
DATABASE autohaendler;