From 795940c0f278b7e2ff4ff7b0e328dca480662a1c Mon Sep 17 00:00:00 2001
From: arf20 <aruizfernandez05@gmail.com>
Date: Wed, 20 Mar 2024 17:31:54 +0100
Subject: Add ticket and ticket management

---
 dbinit.sql | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

(limited to 'dbinit.sql')

diff --git a/dbinit.sql b/dbinit.sql
index b505dbc..017f60a 100644
--- a/dbinit.sql
+++ b/dbinit.sql
@@ -28,7 +28,18 @@ CREATE TABLE `arfnet2`.`orders` (
     `client` INT NOT NULL ,
     `billing` VARCHAR(255) NOT NULL ,
     `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
-    `status` ENUM('setting up','active','inactive') NOT NULL ,
+    `status` ENUM('setting up','active','inactive') NOT NULL DEFAULT 'setting up' ,
     `comments` TEXT NOT NULL ,
     PRIMARY KEY (`id`)
 );
+
+CREATE TABLE `arfnet2`.`tickets` (
+    `id` INT NOT NULL AUTO_INCREMENT ,
+    `order` INT NOT NULL ,
+    `subject` VARCHAR(255) NOT NULL ,
+    `body` TEXT NOT NULL ,
+    `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
+    `status` ENUM('open','closed') NOT NULL DEFAULT 'open' ,
+    `asignee` INT NOT NULL ,
+    PRIMARY KEY (`id`)
+);
-- 
cgit v1.2.3

