diff --git a/README.md b/README.md index dae78c0..2741403 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ RelSpec is a comprehensive database relations management tool that reads, transf ## Overview -RelSpec provides bidirectional conversion between various database specification formats, allowing you to: +RelSpec provides bidirectional conversion and comparison between various database specification formats, allowing you to: - Inspect live databases and extract their structure -- Convert between different ORM models (GORM, Bun) -- Transform legacy schema definitions (Clarion DCTX, XML, JSON) -- Generate standardized specification files (JSON, YAML) +- Convert between different ORM models (GORM, Bun , etc.) +- Transform legacy schema definitions (Clarion DCTX, XML, JSON, etc.) +- Generate standardized specification files (JSON, YAML, etc.) -![1.00](./assets/image/relspec1.jpg) +![1.00](./assets/image/relspec1_512.jpg) ## Features @@ -34,6 +34,8 @@ RelSpec provides bidirectional conversion between various database specification ```bash go get github.com/wdevs/relspecgo + +go install -v git.warky.dev/wdevs/relspecgo/cmd/relspec@latest ``` ## Usage @@ -66,6 +68,10 @@ relspecgo/ └── tests/ # Test files ``` +## Todo + +[Todo List of Features](./TODO.md) + ## Development ### Prerequisites diff --git a/TODO.md b/TODO.md index 5a75650..d8dc24f 100644 --- a/TODO.md +++ b/TODO.md @@ -1,110 +1,45 @@ # RelSpec - TODO List - - -## Input Readers -- [ ] **Database Inspector** - - [ ] PostgreSQL driver +## Input Readers / Writers +- [x] **Database Inspector** + - [x] PostgreSQL driver - [ ] MySQL driver - [ ] SQLite driver - [ ] MSSQL driver - - [ ] Foreign key detection - - [ ] Index extraction + - [x] Foreign key detection + - [x] Index extraction + - [ ] .sql file generation with sequence and priority +- [*] .dbml: Database Markup Language (DBML) for textual schema representation. +- [ ] Prisma schema support (PSL format) .prisma +- [ ] Entity Framework (.NET) model .edmx +- [ ] TypeORM support +- [ ] .hbm.xml / schema.xml: Hibernate/Propel mappings (Java/PHP) +- [ ] Django models.py (Python classes), Sequelize migrations (JS) +- [ ] .avsc: Avro schema (JSON format for data serialization) -- [ ] **XML Reader** - - [ ] XML schema parser - - [ ] Validation against XSD -- [ ] **JSON Reader** - - [ ] JSON schema parser - - [ ] Schema validation - -- [ ] **Clarion DCTX Reader** - - [ ] DCTX file parser - - [ ] Legacy format support - -- [ ] **GORM Model Reader** - - [ ] Go AST parser for GORM tags - - [ ] Struct field analysis - - [ ] Relation tag extraction - -- [ ] **Bun Model Reader** - - [ ] Go AST parser for Bun tags - - [ ] Struct field analysis - - [ ] Relation tag extraction - -## Output Writers -- [ ] **GORM Writer** - - [ ] Go struct generation - - [ ] GORM tag formatting - - [ ] Relation definitions - - [ ] gofmt integration - -- [ ] **Bun Writer** - - [ ] Go struct generation - - [ ] Bun tag formatting - - [ ] Relation definitions - - [ ] gofmt integration - -- [ ] **JSON Writer** - - [ ] Schema serialization - - [ ] Pretty printing - -- [ ] **YAML Writer** - - [ ] Schema serialization - - [ ] Comment preservation - -## CLI Application -- [ ] Command-line interface using cobra -- [ ] Input format flags -- [ ] Output format flags -- [ ] Connection string handling -- [ ] File I/O operations -- [ ] Progress indicators -- [ ] Error handling and reporting -- [ ] Configuration file support - -## Testing -- [ ] Unit tests for each reader -- [ ] Unit tests for each writer -- [ ] Integration tests for conversion pipelines -- [ ] Test fixtures for all formats -- [ ] Database test containers -- [ ] Benchmark tests for large schemas ## Documentation - [ ] API documentation (godoc) - [ ] Usage examples for each format combination -- [ ] Migration guides -- [ ] Architecture documentation -- [ ] Contributing guidelines ## Advanced Features - [ ] Dry-run mode for validation -- [ ] Diff tool for comparing specifications +- [x] Diff tool for comparing specifications - [ ] Migration script generation - [ ] Custom type mapping configuration - [ ] Batch processing support - [ ] Watch mode for auto-regeneration -## Performance -- [ ] Concurrent processing for multiple tables -- [ ] Streaming for large databases -- [ ] Memory optimization -- [ ] Caching layer for repeated operations - -## Quality & Maintenance -- [ ] Linting with golangci-lint -- [ ] Code coverage > 80% -- [ ] Security scanning -- [ ] Dependency updates automation -- [ ] Release automation - ## Future Considerations - [ ] Web UI for visual editing - [ ] REST API server mode - [ ] Support for NoSQL databases - [ ] GraphQL schema generation -- [ ] Prisma schema support -- [ ] TypeORM support + +## Performance +- [ ] Concurrent processing for multiple tables +- [ ] Streaming for large databases +- [ ] Memory optimization +- [ ] Caching layer for repeated operations diff --git a/assets/image/relspec1_512.jpg b/assets/image/relspec1_512.jpg new file mode 100644 index 0000000..31362d6 Binary files /dev/null and b/assets/image/relspec1_512.jpg differ