From 221595af38346d411859847aed29f1068b938ab8 Mon Sep 17 00:00:00 2001
From: "Dominik.Sigmund" <dominik.sigmund@br.de>
Date: Mon, 8 Jul 2024 17:21:50 +0200
Subject: [PATCH] Added todos

---
 commands/add.go  | 16 +++++++++++++++-
 commands/init.go | 16 +++++++++++++++-
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/commands/add.go b/commands/add.go
index 4ae7c3d..2df7f56 100644
--- a/commands/add.go
+++ b/commands/add.go
@@ -13,7 +13,21 @@ func Add(tablename string) {
 func addTable(name string) {
 	slug := utils.Slugify(name)
 
-	// TODO: Do Stuff
+	// TODO: Do Stuff:
+	/*
+		- Parameter --model (yamL) as file or string
+    - if nothing, ask for fields (name, type, primary key, foreign key, unique, not null, auto increment, default value)
+		- Check if the table already exists in the datasmith.yaml file
+		- Add a new table and columns to the datasmith.yaml file
+		- Create a new table file in the sql directory (by database type)
+		- Add Table to import-sql.sh
+		- Add Description to the DBML file
+		- Add Description and mermaid to the README.md file
+		- Add Test to gitlab-ci.yml
+		- Add to CHANGELOG.md
+		- Bump version in datasmith.yaml
+
+	*/
 
 	fmt.Printf("Added new table '%s' to the project\n", slug)
 }
diff --git a/commands/init.go b/commands/init.go
index c22afcd..5c7ef18 100644
--- a/commands/init.go
+++ b/commands/init.go
@@ -43,7 +43,21 @@ func InitProject(name string, dbType string) {
 	// Create LICENSE.md file from template
 	createLicenseFile(slug, name)
 
-	// TODO: copy base files
+	// TODO: copy base files from https://gitlab.ard.de/br/buzzboard/database/-/tree/develop?ref_type=heads
+	/*
+		- .gitignore
+		- .dockerignore
+		- .sqlfluff (by database type)
+		- Containerfile (by database type)
+		- README.md
+		- import-sql.sh (by database type)
+		- .gilab-ci.yml (by database type) (also import tests from blessing of the day)
+		- k8s/deployment.template.yaml
+		- k8s/service.template.yaml
+		- k8s/persistentVolume.template.yaml
+		- k8s/persistentVolumeClaim.template.yaml
+		- sql/database.sql (by database type)
+	*/
 
 	fmt.Printf("Initialized new project structure in '%s'\n", slug)
 
-- 
GitLab