Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeStamp column nullable or not #541

Closed
cremor opened this issue Jun 11, 2024 · 0 comments · Fixed by #577
Closed

TimeStamp column nullable or not #541

cremor opened this issue Jun 11, 2024 · 0 comments · Fixed by #577

Comments

@cremor
Copy link

cremor commented Jun 11, 2024

Please clearly describe what the SQL Sink is doing incorrectly:

If I use the "autoCreateSqlDatabase": true setting, the [TimeStamp] column is created as NULL, although the readme says it's NOT NULL here.

Please clearly describe the expected behavior:

The auto created table should match the readme.

List the names and versions of all Serilog packages used in the project:

  • Serilog: 3.1.1
  • Serilog.AspNetCore: 8.0.1
  • Serilog.Extensions.Hosting: 8.0.0
  • Serilog.Settings.Configuration: 8.0.0
  • Serilog.Sinks.Async: 1.5.0
  • Serilog.Sinks.Console: 5.0.1
  • Serilog.Sinks.Debug: 2.0.0
  • Serilog.Sinks.File: 5.0.0
  • Serilog.Sinks.MSSqlServer: 6.6.1

Target framework and operating system:

.NET 8
OS: Windows 10

Provide a simple reproduction of your Serilog configuration code:

builder.Host.UseSerilog((context, services, loggerConfiguration) => loggerConfiguration.ReadFrom.Configuration(context.Configuration));

Provide a simple reproduction of your Serilog configuration file, if any:

"Serilog": {
  "Using": [ "Common" ],
  "MinimumLevel": {
    "Default": "Information",
    "Override": {
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "WriteTo": {
    "DbSink": {
      "Name": "MSSqlServer",
      "Args": {
        "connectionString": "DefaultConnection",
        "sinkOptionsSection": {
          "tableName": "Logs",
          "autoCreateSqlTable": true
        }
      }
    }
  }
}

Provide a simple reproduction of your application code:

Just start the app to let the log table creation happen.

ckadluba added a commit to ckadluba/serilog-sinks-mssqlserver that referenced this issue Sep 26, 2024
The Timestamp column is nullable by default but the README.md stated the opposite. This was fixed now.
@ckadluba ckadluba linked a pull request Sep 26, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Sep 26, 2024
@ckadluba ckadluba mentioned this issue Oct 18, 2024
ckadluba added a commit that referenced this issue Oct 18, 2024
* Fixed issue #580: Removed deprecated transitive dependency on Microsoft.NETCore.Targets by removing runtime identifier (thanks to @david-brink-talogy)
* Fixed issues #540 and #541 in README
* Added performance tests including a GitHub actions workflow
* Minor cleanups and fixes
ckadluba added a commit that referenced this issue Oct 18, 2024
* Fixed issue #580: Removed deprecated transitive dependency on Microsoft.NETCore.Targets by removing runtime identifier (thanks to @david-brink-talogy)
* Fixed issues #540 and #541 in README
* Added performance tests including a GitHub actions workflow
* Minor cleanups and fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant