DB Scaffold is an Amber plugin utility to generate scaffolding from an existing database. The goal is to simplify the the development of Amber applications.
Add this to your Amber Projects shard.yml
:
targets:
db_scaffold:
main: lib/db_scaffold/src/db_scaffold.cr
dependencies:
db_scaffold:
github: drujensen/db_scaffold
Make sure the database_url
in the config/environments/development.yml
is pointing to your existing database.
Then run:
shards build
bin/db_scaffold [--all|--type TYPE] (table_names)
If you want to generate only model, use --type
option.
bin/db_scaffold --type model users
- Fork it ( https://github.com/drujensen/db_scaffold/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- drujensen Dru Jensen - creator, maintainer