{"id":24295438,"url":"https://github.com/osaxma/schema-dart","last_synced_at":"2025-10-06T13:31:49.544Z","repository":{"id":44119408,"uuid":"449048607","full_name":"osaxma/schema-dart","owner":"osaxma","description":"Generate dart type definitions from PostgreSQL database schema (WIP)","archived":false,"fork":false,"pushed_at":"2024-01-16T12:57:21.000Z","size":129,"stargazers_count":21,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-16T19:08:31.277Z","etag":null,"topics":["dart","flutter","postgres","postgresql","supabase"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/schema_dart","language":"Dart","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/osaxma.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-17T21:06:23.000Z","updated_at":"2024-11-04T16:42:48.000Z","dependencies_parsed_at":"2024-11-14T13:20:06.702Z","dependency_job_id":"643cdd87-478a-4af5-8e57-d9e530b32cdc","html_url":"https://github.com/osaxma/schema-dart","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"27f40a247adbc4a2269fe3f92b7f165191e0f48f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osaxma%2Fschema-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osaxma%2Fschema-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osaxma%2Fschema-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osaxma%2Fschema-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osaxma","download_url":"https://codeload.github.com/osaxma/schema-dart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235527753,"owners_count":19004373,"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":["dart","flutter","postgres","postgresql","supabase"],"created_at":"2025-01-16T18:59:31.959Z","updated_at":"2025-10-06T13:31:49.094Z","avatar_url":"https://github.com/osaxma.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# schema-dart\nGenerate dart type definitions from PostgreSQL database schema (MVP)\n\n\n## Installation:\n\nThe package can be installed as follow:\n\n```\n[~] dart pub global activate schema_dart\n```\n\n\n## Usage:\n\nWithin a dart/flutter project directory, you can run one of the following examples: \n\n- generate data classes for public schema (default)\n  ```\n  schema-dart -c postgresql://postgres:postgres@localhost:54322/postgres -o path/to/output/directory\n  ```\n- generate for data classes for a \"cms\" schema \n  ```\n  schema-dart -c \u003cconnection-string\u003e -o \u003coutput-dir\u003e -s cms\n  ```\n\n- generate data classes for specific tables from public schema (format sensitive): \n  ```\n  schema-dart -c \u003cconnection-string\u003e -o \u003coutput-dir\u003e -t \"users\",\"posts\"\n  ```\n  or\n  ```\n  schema-dart -c \u003cconnection-string\u003e -o \u003coutput-dir\u003e --schema=api --tables=\"profiles\",\"posts\"\n  ```\n\n\n\u003e [!NOTE]\n\u003e \n\u003e if you receive the following error:\n\u003e ```\n\u003e Severity.error Server does not support SSL, but it was required.\n\u003e ```\n\u003e you can pass `--no-ssl` flag such as (not recommended):\n\u003e ```\n\u003e schema-dart --no-ssl -c  \u003cconnection-string\u003e -o \u003coutput-dir\u003e \n\u003e ```\n\nAll usage information:\n```\nGenerate Data Classes for PostgreSQL schema\n  \nExamples: \n\n  # generate data classes for public schema (default)\n  schema-dart -c postgresql://postgres:postgres@localhost:54322/postgres -o path/to/output/directory\n\n  # generate for data classes for a \"cms\" schema \n  schema-dart -c \u003cconnection-string\u003e -o \u003coutput-dir\u003e -s cms\n\n  # generate data classes for specific tables from public schema (format sensitive): \n  schema-dart -c \u003cconnection-string\u003e -o \u003coutput-dir\u003e -t \"users\",\"posts\"\n  # or\n  schema-dart -c \u003cconnection-string\u003e -o \u003coutput-dir\u003e --schema=api --tables=\"profiles\",\"posts\"\n  \n\nUsage: schema-dart \u003ccommand\u003e [arguments]\n\nGlobal options:\n-h, --help                 Print this usage information.\n-c, --connection-string    PostgreSQL connection string in the following format:\n                           postgresql://\u003cusername\u003e:\u003cpassword\u003e@\u003chost\u003e:\u003cport\u003e/\u003cdatabase-name\u003e\n-o, --output-dir           The output directory for the generated dart files\n-s, --schema               specify the schema\n                           (defaults to \"public\")\n-t, --tables=\u003cString\u003e      provide a specific list of tables to generate data classes for.\n                           (defaults to all tables)\n    --no-ssl               Disable SSL for postgres connection (not recommended)\n-n, --nullable-fields      When provided, all fields in generated class will be nullable (useful for partial table queries and for local table construction update/insert)\n-i, --nullable-ids         When provided, columns that are identity \u0026 have identity generations will be generated as nullable fields\n-d, --nullable-defaults    When provided, identity columns that have default values will be generated as nullable fields\n-u, --use-utc              When provided, `.toUtc` will be added to all generated DateTime fields\n-v, --verbose              Enable verbose logging.\n    --version              Print the current version.\n\nAvailable commands:\n  help   Display help information for schema-dart.\n\nRun \"schema-dart help \u003ccommand\u003e\" for more information about a command.\n```\n\n## Sample Output:\n\nThe following folder: [example/sample_output](https://github.com/osaxma/schema-dart/tree/main/example/sample_output) contains a sample output from Supabase's `auth` schema.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosaxma%2Fschema-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosaxma%2Fschema-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosaxma%2Fschema-dart/lists"}