Contributor: Theo Gravity
- Allow exclusion of a model prop in migration generation (#2)
This adds a new field, database.exclude.columns
, which when specified, will exclude the list of fields from being generated in the migration file. This allows you to keep a property as part of a model, but not in the migration.
Contributor: Theo Gravity
- Update README.md
Fix rendering issue of the npm badge for readme on the npm package page
Contributor: Theo Gravity
- Fix default not working in knex generation for integers
Contributor: Theo Gravity
-
Objection usability / generation fixes
-
Will no longer overwrite
BaseModel
if it exists. This is so if you have modifications to it, you will not lose them -
Added a note to use
knexSnakeCaseMappers
in yourknex
configuration in the readme -
Updated
migrate.js
to useknexSnakeCaseMappers
Contributor: Theo Gravity
- Fix enum generation; replace
_.capitalize
->_.upperFirst
Contributor: Theo Gravity
- Enum in model: handle if enum value is a number, or contains a dash
Contributor: Theo Gravity
- Enums in models are now generated as Typescript enums
When an enum is detected, a typescript enum will be created in the format of:
{ModelName}{PropertyName}Enum
Enum key names are based off the enum values. If an enum value is not
convertable to a key, then ITEM_{index}
is used instead for the name.
Contributor: Theo Gravity
- Import Model only if relation is defined
Contributor: Theo Gravity
- For knex
date-time
type, auto-adds.defaultTo(knex.fn.now())
Contributor: Theo Gravity
- Remove unnecessary import from model generation
Contributor: Theo Gravity
- Improved validation of the YAML schema to reduce chance of user mistakes (#1)
Contributor: Theo Gravity
- Fix npm publish issue
Contributor: Theo Gravity
- Update README.md
Correct directory output blurb in readme
Contributor: Theo Gravity
- Update package.json metadata
Contributor: Theo Gravity
- Add knex migration generation support
Contributor: Theo Gravity
- Add
idColumn
support
Contributor: Theo Gravity
- Add keywords to package.json for discoverability
Contributor: Theo Gravity
- First version