Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DataSmith
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
apps
DataSmith
Commits
221595af
Commit
221595af
authored
9 months ago
by
Sigmund, Dominik
Browse files
Options
Downloads
Patches
Plain Diff
Added todos
parent
f9f4c816
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#82100
canceled
9 months ago
Stage: build
Stage: scan
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
commands/add.go
+15
-1
15 additions, 1 deletion
commands/add.go
commands/init.go
+15
-1
15 additions, 1 deletion
commands/init.go
with
30 additions
and
2 deletions
commands/add.go
+
15
−
1
View file @
221595af
...
...
@@ -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
)
}
...
...
This diff is collapsed.
Click to expand it.
commands/init.go
+
15
−
1
View file @
221595af
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment