FirebirdSql.Data.FirebirdClient icon indicating copy to clipboard operation
FirebirdSql.Data.FirebirdClient copied to clipboard

Scaffolding improvements

Open fdcastel opened this issue 1 year ago • 8 comments

Fix #1104

This PR adds to scaffolding code:

  • Ability to distinguish NUMERIC from DECIMAL datatypes.
  • Precision and Scale for NUMERIC/DECIMAL column types.
  • Collation for CHAR/VARCHAR column types.
  • Expression for COMPUTED BY columns.

Other changes (may affect other tests?):

  • Adds COLLATE UNICODE_FSS to CS_FIELD column in FbTestsSetup.CreateTables().

Minor changes:

  • Refactor GetColumnsQuery

ToDo / Checklist:

  • [x] Manual tests with dotnet ef dbcontext scaffold (in progress)
  • [x] DEFAULT values
  • [x] Comments
  • [x] BLOB Segment size
  • [x] CHARSET
  • [x] GENERATED ALWAYS/BY DEFAULT AS IDENTITY

Firebird 4+:

  • [x] DECFLOAT
  • [x] INT128
  • [x] TIME WITH TIME ZONE
  • [x] TIMESTAMP WITH TIME ZONE

Aborted

  • [ ] ~CHECK Constraints~
  • [ ] ~Global Temporary Tables (GTT)~

Remarks

The changes are being made only in scaffolding code.

Database (DDL script) generation and migrations should be done in a separate (future) PR.`

fdcastel avatar Jul 11 '23 23:07 fdcastel

@cincuranet How do you build "debug" nuget packages on your machine?

It seems the current build.ps1 doesn't contains anything related to this.

In other words: how did you build 9.2.0-alpha1?

I wish to tag and use my locally-built package (e.g. 9.2.1-dev) in one test application to check the result of code generated by dotnet ef dbcontext scaffold command.

fdcastel avatar Jul 11 '23 23:07 fdcastel

Change the versions in Directory.Build.props.

cincuranet avatar Jul 12 '23 05:07 cincuranet

Change the versions in Directory.Build.props.

Update: passing /p:VERSIONSUFFIX=alpha2 to dotnet msbuild has the same effect, without the need to change any source file -- useful for passing parameters to build scripts.

fdcastel avatar Jul 12 '23 20:07 fdcastel

@cincuranet I believe this could be merged, now.

When possible, please review.

fdcastel avatar Jul 12 '23 21:07 fdcastel

@fdcastel Can you please resolve the conflicts. Thanks.

cincuranet avatar Oct 01 '23 14:10 cincuranet

@fdcastel Can you please resolve the conflicts. Thanks.

Sure! Done!

fdcastel avatar Oct 01 '23 23:10 fdcastel

Sorry. Hold on. Some EF tests failing.

fdcastel avatar Oct 01 '23 23:10 fdcastel

Fixed! (Bad rebase)

fdcastel avatar Oct 01 '23 23:10 fdcastel