- Better argument names for Decimal types for MySQL
- Expose schema generation without writing via
Refract.generate
- Actually fix Enum fields
- Fixes inability to have non-nullable non-default enum columns
- Fixes issue where enum keys without a comment, would always have a comment which would be the name of the key itself
- Fixes MySQL native type argument for
Char
(#16)
- Fixes crash when previewFeatures are not available in generator (#12)
- Allows
Mixins
to use.Block()
for@@index
etc.
- Relationships fields in more type safe and shorter way (#9)
- Documentation improvements
- Deprecated
Comment
modifier over changing.Field()
& Enum signatures to include an optional ending parameter
- Update README image
- Adds
@@fulltext
compound field
- Improved documentation
- Adds ability to add comments to models / enums
- Adds
Comment
modifier
- Refactors and fixes bugs in the postgresql native db modifiers (#5)
- Adds support to CockroachDB native modifiers and scallar array modifier (#6)
- Fixes nullable enums
- Allows for direct schema imports into
Refract
- e.g.
import schema from './schema'
- e.g.
Spoke too soon
- Adds all the
@db
attributes formysql
,postgresql
&mongodb
providers - Adds
.Block()
for properties like@@map
,@@id
etc. - Adds
Unsupported
type
Should be at parity with Prisma schema now
- Adds
OnUpdate
&OnDelete
referential action modifiers - Adds pre-generation checks for relations (assert both sides have Ids etc.)
- Adds support for
name
field to Relation fields for ambigious relations - Renames
Pk().Fk()
toFields
&References
modifiers
Once again thanks to bacali95 for contributing!
- Fixes
String
type to be able to have@id
decorator #3 - Improved formatting (decorator alignment) #2
- Fixes transforming function calls as values #1
Big thanks to bacali95 for these changes :)
- Adds
Raw
decorator escape hatch, similar to.Raw()
model method- Can now do
Raw('@db.ObjectId')
etc to use un-supported decorators
- Can now do
- Fixes some out of date documentation
- Adds
Map
decorator (e.g.@map("foo")
) - Renames
Varchar
toString
- Renames
Index
toId
- Adds
cuid()
,uuid()
- Adds
- Adds
Ignore
decorator (e.g.@ignore
) - Adds
Float
,BigInt
,Bytes
,Decimal
scalars - Refactors how Enums are created
- Adds
Key
- Enums definitions can now have decorators
- Adds
- Refactors types on data-types to be more specific
- Fix issue with
Enum
codegen always being nullable when having >=1 modifier - Improve documentation
- Useage documentation
- Added CI testing
- Removed field checking on relationships because of fails with circular relationships
- Added block alignment
- Added
OneToOne()
relationships
- Added
.Raw()
Prisma escape hatch - Added
.Mixin()
utility field
- Added enums
- Initial release