This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -52,7 +52,7 @@
|
|||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\"
|
||||||
|
|||||||
13
server/AyaNova/biz/ReportRenderType.cs
Normal file
13
server/AyaNova/biz/ReportRenderType.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
namespace AyaNova.Biz
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// All AyaNova report rendering types
|
||||||
|
/// </summary>
|
||||||
|
public enum ReportRenderType : int
|
||||||
|
{// rendertype(type to render, default is pdf, but could be text, csv etc),
|
||||||
|
PDF = 0,
|
||||||
|
Text = 1,
|
||||||
|
CSV = 2,
|
||||||
|
HTML = 3
|
||||||
|
}
|
||||||
|
}//eons
|
||||||
@@ -69,6 +69,7 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
|
|
||||||
public virtual DbSet<Logo> Logo { get; set; }
|
public virtual DbSet<Logo> Logo { get; set; }
|
||||||
|
public virtual DbSet<Report> Report { 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
|
//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
|
//and commented out the above on configuring
|
||||||
|
|||||||
47
server/AyaNova/models/Report.cs
Normal file
47
server/AyaNova/models/Report.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using AyaNova.Biz;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace AyaNova.Models
|
||||||
|
{
|
||||||
|
|
||||||
|
public class Report
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string Name { get; set; }
|
||||||
|
public bool Active { get; set; }
|
||||||
|
public string Notes { get; set; }
|
||||||
|
public AuthorizationRoles Roles { get; set; }
|
||||||
|
[Required]
|
||||||
|
public AyaType ObjectType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string Template { get; set; }
|
||||||
|
public string Style { get; set; }
|
||||||
|
public string JsPrerender { get; set; }
|
||||||
|
public string JsHelpers { get; set; }
|
||||||
|
[Required]
|
||||||
|
public ReportRenderType RenderType { get; set; }
|
||||||
|
|
||||||
|
//tentative in case of need
|
||||||
|
// public string Locale { get; set; }
|
||||||
|
// public string Header { get; set; }
|
||||||
|
// public string Footer { get; set; }
|
||||||
|
|
||||||
|
public Report()
|
||||||
|
{
|
||||||
|
RenderType = ReportRenderType.PDF;
|
||||||
|
ObjectType = AyaType.NoType;
|
||||||
|
Roles = AuthorizationRoles.All;
|
||||||
|
Active = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}//eoc
|
||||||
|
|
||||||
|
}//eons
|
||||||
@@ -20,10 +20,10 @@ namespace AyaNova.Util
|
|||||||
/////////// CHANGE THIS ON NEW SCHEMA UPDATE ////////////////////
|
/////////// CHANGE THIS ON NEW SCHEMA UPDATE ////////////////////
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
private const int DESIRED_SCHEMA_LEVEL = 13;
|
private const int DESIRED_SCHEMA_LEVEL = 14;
|
||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 390;
|
internal const long EXPECTED_COLUMN_COUNT = 401;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 140;
|
internal const long EXPECTED_INDEX_COUNT = 142;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
|
|
||||||
@@ -717,7 +717,15 @@ $BODY$;
|
|||||||
await SetSchemaLevelAsync(++currentSchema);
|
await SetSchemaLevelAsync(++currentSchema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////
|
||||||
|
// REPORT table
|
||||||
|
if (currentSchema < 14)
|
||||||
|
{
|
||||||
|
LogUpdateMessage(log);
|
||||||
|
await ExecQueryAsync("CREATE TABLE areport (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name varchar(255) not null unique, active bool, " +
|
||||||
|
"notes text, roles integer not null, objecttype integer not null, template text, style text, jsprerender text, jshelpers text, rendertype integer not null )");
|
||||||
|
await SetSchemaLevelAsync(++currentSchema);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -268,6 +268,11 @@ namespace AyaNova.Util
|
|||||||
{
|
{
|
||||||
await conn.OpenAsync();
|
await conn.OpenAsync();
|
||||||
|
|
||||||
|
//### DELIBERATELY IGNORED
|
||||||
|
//Some data is deliberately not deleted for now:
|
||||||
|
//Reports
|
||||||
|
//Logos
|
||||||
|
|
||||||
//Delete from user options table first
|
//Delete from user options table first
|
||||||
using (var cmd = new Npgsql.NpgsqlCommand())
|
using (var cmd = new Npgsql.NpgsqlCommand())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user