From f06b3a6d7c07abd916038fa187584a30bfb5f1de Mon Sep 17 00:00:00 2001
From: Sebastian Baltes <Sebastian.Baltes@uni-bayreuth.de>
Date: Tue, 27 May 2025 20:10:59 +0200
Subject: Add code for assignment 5

---
 .../resources/db/migration/V1__create_pos_table.sql    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 data/src/main/resources/db/migration/V1__create_pos_table.sql

(limited to 'data/src/main/resources/db/migration/V1__create_pos_table.sql')

diff --git a/data/src/main/resources/db/migration/V1__create_pos_table.sql b/data/src/main/resources/db/migration/V1__create_pos_table.sql
new file mode 100644
index 0000000..b61cecc
--- /dev/null
+++ b/data/src/main/resources/db/migration/V1__create_pos_table.sql
@@ -0,0 +1,18 @@
+SET TIME ZONE 'UTC';
+
+CREATE SEQUENCE pos_seq START WITH 1 INCREMENT BY 1;
+
+CREATE TABLE pos (
+    id bigint NOT NULL PRIMARY KEY,
+    created_at timestamp NOT NULL,
+    updated_at timestamp NOT NULL,
+    name varchar(255) NOT NULL UNIQUE CHECK (name <> ''),
+    description text CHECK (description <> ''),
+    type varchar(255) NOT NULL,
+    campus varchar(255) NOT NULL,
+    street varchar(255) NOT NULL CHECK (street <> ''),
+    house_number int NOT NULL,
+    house_number_suffix varchar(1),
+    postal_code int NOT NULL,
+    city varchar(255) NOT NULL CHECK (city <> '')
+);
-- 
cgit v1.2.3

