axum-async-graphql/migrations/20240530193533_modelle.up.sql

10 lines
385 B
MySQL
Raw Permalink Normal View History

2024-05-31 00:32:51 +02:00
-- Add up migration script here
2024-06-03 15:41:00 +02:00
CREATE TABLE IF NOT EXISTS modelle (
2024-06-04 15:38:07 +02:00
id SERIAL PRIMARY KEY,
2024-05-31 00:32:51 +02:00
name VARCHAR NOT NULL,
typ_id SERIAL,
hersteller_id SERIAL,
2024-06-04 15:38:07 +02:00
CONSTRAINT fk_typ FOREIGN KEY(typ_id) REFERENCES typen(id) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_hersteller FOREIGN KEY (hersteller_id) REFERENCES hersteller(id) ON DELETE NO ACTION ON UPDATE NO ACTION
2024-05-31 00:32:51 +02:00
)