diff --git a/commands/add.go b/commands/add.go index 4ae7c3d2b9612ecf76caa83577672e144930b10b..2df7f561d96d56a7ab1fd728855be839940c1c65 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 c22afcd99d0f854fc3a10330152cdc3d359361e3..5c7ef185eb493043a8027e1272921f3cf39f5607 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)