{"id":28173357,"url":"https://github.com/samuelmanzanera/yaml2ddl","last_synced_at":"2026-04-16T18:05:50.847Z","repository":{"id":57403011,"uuid":"144287647","full_name":"samuelmanzanera/yaml2ddl","owner":"samuelmanzanera","description":"Generate a DDL schema from yaml description","archived":false,"fork":false,"pushed_at":"2018-11-09T14:07:31.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T21:18:49.076Z","etag":null,"topics":["ddl","nodejs","schema","sql","yaml"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuelmanzanera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-10T13:11:19.000Z","updated_at":"2022-10-21T07:59:50.000Z","dependencies_parsed_at":"2022-09-18T11:40:17.602Z","dependency_job_id":null,"html_url":"https://github.com/samuelmanzanera/yaml2ddl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelmanzanera%2Fyaml2ddl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelmanzanera%2Fyaml2ddl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelmanzanera%2Fyaml2ddl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelmanzanera%2Fyaml2ddl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelmanzanera","download_url":"https://codeload.github.com/samuelmanzanera/yaml2ddl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414364,"owners_count":22067272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddl","nodejs","schema","sql","yaml"],"created_at":"2025-05-15T20:13:25.987Z","updated_at":"2026-04-16T18:05:50.807Z","avatar_url":"https://github.com/samuelmanzanera.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yaml2ddl\n\n[![npm version](https://badge.fury.io/js/yaml2ddl.svg)](https://badge.fury.io/js/yaml2ddl)\n\nGenerate a DDL schema from yaml description\n\n#### Support\n- For SQL database\n  - Auto increment handled for MySQL, SQL Server, SQLITE\n- Soon support for MongoDB\n\n### Installation\n```sh\nnpm install yaml2ddl\n```\n\n#### Usage\n```js\nconst yaml2dll = require('yaml2dll')\n\n// Generate from file\nconst schemaFileUri = './user.table.yaml'\nyaml2dll.generateFromFile(schemaFileUri, { dialect: 'mysql' })\n  .then()\n  .catch()\n\n//Generate from source\nconst sqlGenerated = yaml2dll.generate(yamlSource, { dialect: 'mysql' })\n```\n\n### Schema example\n\n```yaml\ntable: user\nconstraints:\n    - columns: \n        - id\n      name: PK_User\n      type: primary\ncolumns:\n    - name: id\n        type: \n          datatype: int\n        options:\n            notnull: true\n            autoincrement: true\n    - name: email\n        type: \n          datatype: varchar\n          length: 100\n```\n\n### Licence\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmanzanera%2Fyaml2ddl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelmanzanera%2Fyaml2ddl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmanzanera%2Fyaml2ddl/lists"}