This commit is contained in:
@@ -357,7 +357,9 @@ namespace AyaNova.Biz
|
||||
//NOTIFY SUBSCRIPTIONS
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from anotifysubscription where userid = {dbObject.Id}");
|
||||
//personal datalistview
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from adatalistview where public = {false} and userid = {dbObject.Id}");
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from adatalistview where public = {false} and userid = {dbObject.Id}");
|
||||
//Dashboard view
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from adashboardview where userid = {dbObject.Id}");
|
||||
|
||||
await EventLogProcessor.DeleteObjectLogAsync(UserId, BizType, dbObject.Id, dbObject.Name, ct);
|
||||
await Search.ProcessDeletedObjectKeywordsAsync(dbObject.Id, BizType, ct);
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace AyaNova.Models
|
||||
|
||||
public virtual DbSet<Logo> Logo { get; set; }
|
||||
public virtual DbSet<Report> Report { get; set; }
|
||||
public virtual DbSet<DashboardView> DashboardView { get; set; }
|
||||
|
||||
//Note: had to add this constructor to work with the code in startup.cs that gets the connection string from the appsettings.json file
|
||||
//and commented out the above on configuring
|
||||
|
||||
23
server/AyaNova/models/DashboardView.cs
Normal file
23
server/AyaNova/models/DashboardView.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
|
||||
public class DashboardView
|
||||
{
|
||||
public DashboardView(){
|
||||
View="[]";//empty view by default
|
||||
}
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
[Required]
|
||||
public long UserId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string View { get; set; }//JSON Dashboard registry view object
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ namespace AyaNova.Util
|
||||
/////////// CHANGE THIS ON NEW SCHEMA UPDATE ////////////////////
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 14;
|
||||
private const int DESIRED_SCHEMA_LEVEL = 15;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 414;
|
||||
internal const long EXPECTED_INDEX_COUNT = 142;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 417;
|
||||
internal const long EXPECTED_INDEX_COUNT = 144;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
@@ -431,7 +431,7 @@ $BODY$;
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
|
||||
await ExecQueryAsync("CREATE TABLE adatalistview (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userId bigint not null, name varchar(255) not null unique, public bool not null," +
|
||||
await ExecQueryAsync("CREATE TABLE adatalistview (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid bigint not null, name varchar(255) not null unique, public bool not null," +
|
||||
"listkey varchar(255) not null, listview text)");
|
||||
|
||||
await SetSchemaLevelAsync(++currentSchema);
|
||||
@@ -732,19 +732,14 @@ $BODY$;
|
||||
await AyaNova.Biz.PrimeData.PrimeReportTemplates();
|
||||
}
|
||||
|
||||
// public string HeaderTemplate { get; set; }
|
||||
// public string FooterTemplate { get; set; }
|
||||
// public bool DisplayHeaderFooter { get; set; }
|
||||
// public ReportPaperFormat PaperFormat { get; set; }
|
||||
// public bool Landscape { get; set; }
|
||||
// public string MarginOptionsBottom { get; set; }
|
||||
// public string MarginOptionsLeft { get; set; }
|
||||
// public string MarginOptionsRight { get; set; }
|
||||
// public string MarginOptionsTop { get; set; }
|
||||
// public string PageRanges { get; set; }
|
||||
// public bool PreferCSSPageSize { get; set; }
|
||||
// public bool PrintBackground { get; set; }
|
||||
// public decimal Scale { get; set; }
|
||||
//////////////////////////////////////////////////
|
||||
//DATAFILTER / DATALISTTEMPLATE tables
|
||||
if (currentSchema < 15)
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
await ExecQueryAsync("CREATE TABLE adashboardview (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid bigint not null unique, view text not null)");
|
||||
await SetSchemaLevelAsync(++currentSchema);
|
||||
}
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ namespace AyaNova.Util
|
||||
await cmd.ExecuteNonQueryAsync();
|
||||
}
|
||||
|
||||
//Delete from users table
|
||||
//Delete users
|
||||
using (var cmd = new Npgsql.NpgsqlCommand())
|
||||
{
|
||||
cmd.Connection = conn;
|
||||
@@ -293,6 +293,9 @@ namespace AyaNova.Util
|
||||
|
||||
cmd.CommandText = "ALTER SEQUENCE auser_id_seq RESTART WITH 2;";
|
||||
await cmd.ExecuteNonQueryAsync();
|
||||
|
||||
cmd.CommandText = "delete from \"adashboardview\" where userid <> 1;";
|
||||
await cmd.ExecuteNonQueryAsync();
|
||||
}
|
||||
|
||||
//Delete non stock translations
|
||||
|
||||
Reference in New Issue
Block a user