First Commit
This commit is contained in:
2
migrations/20240530193519_typen.down.sql
Normal file
2
migrations/20240530193519_typen.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE typen;
|
||||
5
migrations/20240530193519_typen.up.sql
Normal file
5
migrations/20240530193519_typen.up.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Add up migration script here
|
||||
CREATE TABLE typen (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR NOT NULL
|
||||
);
|
||||
2
migrations/20240530193528_hersteller.down.sql
Normal file
2
migrations/20240530193528_hersteller.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE hersteller;
|
||||
5
migrations/20240530193528_hersteller.up.sql
Normal file
5
migrations/20240530193528_hersteller.up.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Add up migration script here
|
||||
CREATE TABLE hersteller (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR NOT NULL
|
||||
);
|
||||
2
migrations/20240530193533_modelle.down.sql
Normal file
2
migrations/20240530193533_modelle.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE modelle;
|
||||
9
migrations/20240530193533_modelle.up.sql
Normal file
9
migrations/20240530193533_modelle.up.sql
Normal 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)
|
||||
)
|
||||
Reference in New Issue
Block a user