linq2db / linq2db

Linq to database provider.
MIT License
2.98k stars 457 forks source link

[Scaffold] Declarative customization of column type #3603

Open MaceWindu opened 2 years ago

MaceWindu commented 2 years ago

all good now, thx!

but please add this feature to the JSON, much easier to work with. Even with the old version was much easier to change the types of columns.

Originally posted by @integral-llc in https://github.com/linq2db/linq2db/discussions/3600#discussioncomment-2873826

MaceWindu commented 2 years ago

Currently I don't think it is a good idea to have such low-level customizations in form of configuration. Feedback is welcome

Metadorius commented 2 years ago

Currently I don't think it is a good idea to have such low-level customizations in form of configuration. Feedback is welcome

I disagree. Sometimes, say, enum values are stored in DB as plain integers for various reasons, and the CLI tool has no way of knowing which column should be an enum or an integer.

Metadorius commented 2 years ago

Also close example would be the usage of sequences (in Firebird language: generators) for certain columns. Currently there's no way to specify which key should use which column. I've tried to look into interceptors but I am not sure if that can be done via interceptors at all.