mirror of
https://github.com/Jetsparrow/karmabot.git
synced 2026-01-21 00:56:09 +03:00
Ensure existence of DB
This commit is contained in:
parent
28bca4832d
commit
e4923e4d79
@ -26,6 +26,8 @@ namespace JetKarmaBot
|
||||
|
||||
public async Task Init()
|
||||
{
|
||||
using (KarmaContext db = Db.GetContext())
|
||||
await db.Database.EnsureCreatedAsync();
|
||||
var httpProxy = new WebProxy($"{Config.Proxy.Url}:{Config.Proxy.Port}")
|
||||
{
|
||||
Credentials = new NetworkCredential(Config.Proxy.Login, Config.Proxy.Password)
|
||||
|
||||
@ -69,7 +69,7 @@ namespace JetKarmaBot.Models
|
||||
entity.Property(e => e.Date)
|
||||
.HasColumnName("date")
|
||||
.HasColumnType("datetime")
|
||||
.HasDefaultValueSql("'CURRENT_TIMESTAMP'");
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||
|
||||
entity.Property(e => e.FromId)
|
||||
.HasColumnName("fromid")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user