AppAny.Quartz.EntityFrameworkCore.Migrations icon indicating copy to clipboard operation
AppAny.Quartz.EntityFrameworkCore.Migrations copied to clipboard

Sqlite support

Open JasonLandbridge opened this issue 3 years ago • 2 comments

Hi there,

Is your feature request related to a problem? Please describe. I have managed to make this package work for Entity Framework 6 code-first for Sqlite and I would like to make a pull request to implement direct support for Sqlite.

Describe the solution you'd like The same way as UsePostgres(), I would like to use UseSqlite()

public class DatabaseContext : DbContext
{
  // ...

  protected override void OnModelCreating(ModelBuilder modelBuilder)
  {
    // Adds Quartz.NET PostgreSQL schema to EntityFrameworkCore
    modelBuilder.AddQuartz(builder => builder
      .UseSqlite()
      .UseSchema("quartz")
      .UseNoPrefix());
  }
}

Describe alternatives you've considered The alternative is importing the entities and configurations directly and wire it up yourself. But it is way easier to just use the setup described above

Additional context

I see #46 is currently under way, which seems to change a lot of things. So I will wait for that to be merged and I can then make my own pull request for Sqlite support

JasonLandbridge avatar Dec 10 '22 11:12 JasonLandbridge

@JasonLandbridge All active PRs merged

sergeyshaykhullin avatar Dec 10 '22 21:12 sergeyshaykhullin

Awesome, I will shortly make a PR! You might also be interested in this discussion where I'm proposing to have this package be the recommended way to setup tables for Quartz.Net when using Entity Framework code-first. Please feel free to add any input you might have :+1:

JasonLandbridge avatar Dec 10 '22 21:12 JasonLandbridge

Done https://www.nuget.org/packages/AppAny.Quartz.EntityFrameworkCore.Migrations.SQLite

sergeyshaykhullin avatar Dec 15 '22 15:12 sergeyshaykhullin

Awesome, thanks @sergeyshaykhullin!

JasonLandbridge avatar Dec 15 '22 17:12 JasonLandbridge