Is your feature request related to a problem? Please describe.
ORMs like EF have support for a code first approach to database development. It would be good to have this in Freql.
Describe the solution you'd like
Implement an ability to generate databases based on FSharp records. There should be some conventions (like id and table_name_id representing a primary key). It could be expanded to handle unions in the future.
Describe alternatives you've considered
Not implementing it. But it would be a good thing to have for rapid development and prototyping.
Additional context
There will need to be a few new attributes to with this.
For example
[<ForeginKey("table", "field")>] for link tables
[<Constraint()>] for various constraints
[<RawSql()>] for tables/fields that need specific SQL
However, some of this could also be moved to/also defined in methods.
For example if static member ForeignKey() exists, it will be used to generate the foreign keys.
Is your feature request related to a problem? Please describe. ORMs like EF have support for a code first approach to database development. It would be good to have this in
Freql
.Describe the solution you'd like Implement an ability to generate databases based on FSharp records. There should be some conventions (like
id
andtable_name_id
representing a primary key). It could be expanded to handle unions in the future.Describe alternatives you've considered Not implementing it. But it would be a good thing to have for rapid development and prototyping.
Additional context There will need to be a few new attributes to with this.
For example
[<ForeginKey("table", "field")>]
for link tables[<Constraint()>]
for various constraints[<RawSql()>]
for tables/fields that need specific SQLHowever, some of this could also be moved to/also defined in methods.
For example if
static member ForeignKey()
exists, it will be used to generate the foreign keys.Projects impacted
Platforms