First Commit

This commit is contained in:
Peter Schiwy
2024-05-31 00:32:51 +02:00
commit bab592edf1
23 changed files with 3268 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
-- Add down migration script here
DROP TABLE typen;

View File

@@ -0,0 +1,5 @@
-- Add up migration script here
CREATE TABLE typen (
id SERIAL PRIMARY KEY,
name VARCHAR NOT NULL
);

View File

@@ -0,0 +1,2 @@
-- Add down migration script here
DROP TABLE hersteller;

View File

@@ -0,0 +1,5 @@
-- Add up migration script here
CREATE TABLE hersteller (
id SERIAL PRIMARY KEY,
name VARCHAR NOT NULL
);

View File

@@ -0,0 +1,2 @@
-- Add down migration script here
DROP TABLE modelle;

View File

@@ -0,0 +1,9 @@
-- Add up migration script here
CREATE TABLE modelle (
id SERIAL PRIMARY KEY,
name VARCHAR NOT NULL,
typ_id SERIAL,
hersteller_id SERIAL,
CONSTRAINT fk_typ FOREIGN KEY(typ_id) REFERENCES typen(id),
CONSTRAINT fk_hersteller FOREIGN KEY (hersteller_id) REFERENCES hersteller(id)
)