mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 11:21:47 -05:00
fookyoo TV fookmi TV
This commit is contained in:
parent
7a4d0e4bb1
commit
428579cf6b
3 changed files with 11 additions and 3 deletions
|
@ -145,7 +145,7 @@ public ActionResult BackupAssets()
|
||||||
string backupname = backupServerDir + "\\ShiftOS-" + DateTime.Now.ToString() + ".sql";
|
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";
|
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));
|
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.Id = Guid.NewGuid().ToString();
|
||||||
backupData.UserId = User.Identity.GetUserId();
|
backupData.UserId = User.Identity.GetUserId();
|
||||||
backupData.DownloadUrl = backupUrl;
|
backupData.DownloadUrl = backupUrl;
|
||||||
|
|
|
@ -205,7 +205,7 @@ public static ApplicationDbContext Create()
|
||||||
}
|
}
|
||||||
|
|
||||||
public DbSet<DatabaseBackup> Backups { get; set; }
|
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<Avatar> UserAvatars { get; set; }
|
||||||
public DbSet<Skin> Skins { get; set; }
|
public DbSet<Skin> Skins { get; set; }
|
||||||
public DbSet<Configuration> Configs { get; set; }
|
public DbSet<Configuration> Configs { get; set; }
|
||||||
|
@ -288,4 +288,12 @@ public class DatabaseBackup
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
public string DownloadUrl { 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; }
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@ public class IndexViewModel
|
||||||
public class BackupViewModel
|
public class BackupViewModel
|
||||||
{
|
{
|
||||||
public IEnumerable<DatabaseBackup> Databases { get; set; }
|
public IEnumerable<DatabaseBackup> Databases { get; set; }
|
||||||
public IEnumerable<DatabaseBackup> AssetFolders { get; set; }
|
public IEnumerable<AssetBackup> AssetFolders { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ManageLoginsViewModel
|
public class ManageLoginsViewModel
|
||||||
|
|
Loading…
Reference in a new issue