fookyoo TV fookmi TV

This commit is contained in:
Michael 2017-03-25 19:51:30 -04:00
parent 7a4d0e4bb1
commit 428579cf6b
3 changed files with 11 additions and 3 deletions

View file

@ -145,7 +145,7 @@ public ActionResult BackupAssets()
string backupname = backupServerDir + "\\ShiftOS-" + DateTime.Now.ToString() + ".sql";
const string sqlCommand = @"BACKUP DATABASE [{0}] TO DISK = N'{1}' WITH NOFORMAT, NOINIT, NAME = N'ShiftOS Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10";
int path = db.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, string.Format(sqlCommand, db.Database.Connection.Database, backupname));
var backupData = new DatabaseBackup();
var backupData = new AssetBackup();
backupData.Id = Guid.NewGuid().ToString();
backupData.UserId = User.Identity.GetUserId();
backupData.DownloadUrl = backupUrl;

View file

@ -205,7 +205,7 @@ public static ApplicationDbContext Create()
}
public DbSet<DatabaseBackup> Backups { get; set; }
public DbSet<DatabaseBackup> AssetBackups { get; set; }
public DbSet<AssetBackup> AssetBackups { get; set; }
public DbSet<Avatar> UserAvatars { get; set; }
public DbSet<Skin> Skins { get; set; }
public DbSet<Configuration> Configs { get; set; }
@ -288,4 +288,12 @@ public class DatabaseBackup
public string UserId { get; set; }
public string DownloadUrl { get; set; }
}
public class AssetBackup
{
public string Id { get; set; }
public DateTime Timestamp { get; set; }
public string UserId { get; set; }
public string DownloadUrl { get; set; }
}
}

View file

@ -17,7 +17,7 @@ public class IndexViewModel
public class BackupViewModel
{
public IEnumerable<DatabaseBackup> Databases { get; set; }
public IEnumerable<DatabaseBackup> AssetFolders { get; set; }
public IEnumerable<AssetBackup> AssetFolders { get; set; }
}
public class ManageLoginsViewModel