Fix sql migration error

This commit is contained in:
Dominic Grimm 2023-02-22 18:06:22 +01:00
parent 7f3cf3b2b5
commit 143b795b92
No known key found for this signature in database
GPG key ID: 6F294212DEAAC530

View file

@ -2,6 +2,7 @@ CREATE TABLE schoolyears (
id SERIAL PRIMARY KEY,
untis_id INTEGER NOT NULL UNIQUE,
name VARCHAR NOT NULL,
active BOOLEAN NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP
);
@ -15,7 +16,7 @@ CREATE TABLE tenants (
untis_id INTEGER NOT NULL UNIQUE,
schoolyear_id INTEGER NOT NULL REFERENCES schoolyears(id),
name VARCHAR NOT NULL,
active BOOLEAN NOT NULL DEFAULT FALSE,
active BOOLEAN NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP
);