From fc7bd403bf41d724bd8dc3bf3b827c592c539171 Mon Sep 17 00:00:00 2001
From: Jokler <jokler@protonmail.com>
Date: Tue, 23 Jun 2020 16:26:07 +0200
Subject: Initial commit

---
 migrations/2020-06-23-134458_create_repositories/up.sql | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 migrations/2020-06-23-134458_create_repositories/up.sql

(limited to 'migrations/2020-06-23-134458_create_repositories/up.sql')

diff --git a/migrations/2020-06-23-134458_create_repositories/up.sql b/migrations/2020-06-23-134458_create_repositories/up.sql
new file mode 100644
index 0000000..513d474
--- /dev/null
+++ b/migrations/2020-06-23-134458_create_repositories/up.sql
@@ -0,0 +1,8 @@
+CREATE TABLE repositories (
+    id SERIAL NOT NULL PRIMARY KEY,
+    name varchar(255) NOT NULL,
+    description varchar(255) NOT NULL,
+    owner bigint UNSIGNED NOT NULL,
+    created timestamp NOT NULL DEFAULT current_timestamp(),
+    CONSTRAINT fk_owner_id FOREIGN KEY (owner) REFERENCES users (id)
+);
-- 
cgit v1.2.3-70-g09d2

