This commit is contained in:
2022-12-22 18:41:34 +00:00
parent 68d00b6aa6
commit 47c3574232
2 changed files with 145 additions and 24 deletions

View File

@@ -304,6 +304,37 @@ namespace Sockeye.Biz
}
#endregion
#region License
{
List<FormField> l = new List<FormField>();
l.Add(new FormField { TKey = "Tags", FieldKey = "Tags" });
l.Add(new FormField { TKey = "Wiki", FieldKey = "Wiki" });
l.Add(new FormField { TKey = "Attachments", FieldKey = "Attachments", Requireable = false });
l.Add(new FormField { TKey = "LicenseCustom1", FieldKey = "LicenseCustom1", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom2", FieldKey = "LicenseCustom2", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom3", FieldKey = "LicenseCustom3", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom4", FieldKey = "LicenseCustom4", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom5", FieldKey = "LicenseCustom5", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom6", FieldKey = "LicenseCustom6", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom7", FieldKey = "LicenseCustom7", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom8", FieldKey = "LicenseCustom8", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom9", FieldKey = "LicenseCustom9", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom10", FieldKey = "LicenseCustom10", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom11", FieldKey = "LicenseCustom11", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom12", FieldKey = "LicenseCustom12", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom13", FieldKey = "LicenseCustom13", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom14", FieldKey = "LicenseCustom14", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom15", FieldKey = "LicenseCustom15", IsCustomField = true });
l.Add(new FormField { TKey = "LicenseCustom16", FieldKey = "LicenseCustom16", IsCustomField = true });
_formFields.Add(SockType.License.ToString(), l);
}
#endregion
//******************************************************
}

View File

@@ -909,6 +909,120 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
+ "wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY )");
//**************** TRANSLATIONS **********************
//english translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Registered to' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expire to' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom1', 'Custom1' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom2', 'Custom2' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom3', 'Custom3' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom4', 'Custom4' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom5', 'Custom5' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom6', 'Custom6' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom7', 'Custom7' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom8', 'Custom8' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom9', 'Custom9' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom10', 'Custom10' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom11', 'Custom11' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom12', 'Custom12' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom13', 'Custom13' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom14', 'Custom14' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom15', 'Custom15' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom16', 'Custom16' FROM atranslation t where t.baselanguage = 'en'");
//spanish translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Registered to' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expire to' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom1', 'Custom1' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom2', 'Custom2' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom3', 'Custom3' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom4', 'Custom4' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom5', 'Custom5' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom6', 'Custom6' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom7', 'Custom7' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom8', 'Custom8' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom9', 'Custom9' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom10', 'Custom10' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom11', 'Custom11' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom12', 'Custom12' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom13', 'Custom13' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom14', 'Custom14' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom15', 'Custom15' FROM atranslation t where t.baselanguage = 'es'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom16', 'Custom16' FROM atranslation t where t.baselanguage = 'es'");
//french translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Registered to' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expire to' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom1', 'Custom1' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom2', 'Custom2' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom3', 'Custom3' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom4', 'Custom4' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom5', 'Custom5' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom6', 'Custom6' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom7', 'Custom7' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom8', 'Custom8' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom9', 'Custom9' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom10', 'Custom10' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom11', 'Custom11' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom12', 'Custom12' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom13', 'Custom13' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom14', 'Custom14' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom15', 'Custom15' FROM atranslation t where t.baselanguage = 'fr'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom16', 'Custom16' FROM atranslation t where t.baselanguage = 'fr'");
//german translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Registered to' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expire to' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom1', 'Custom1' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom2', 'Custom2' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom3', 'Custom3' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom4', 'Custom4' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom5', 'Custom5' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom6', 'Custom6' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom7', 'Custom7' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom8', 'Custom8' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom9', 'Custom9' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom10', 'Custom10' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom11', 'Custom11' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom12', 'Custom12' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom13', 'Custom13' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom14', 'Custom14' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom15', 'Custom15' FROM atranslation t where t.baselanguage = 'de'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseCustom16', 'Custom16' FROM atranslation t where t.baselanguage = 'de'");
currentSchema = 16;
await SetSchemaLevelAsync(currentSchema);
@@ -918,30 +1032,6 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
/*
CREATE TABLE rfcase (id INTEGER PRIMARY KEY, title text not null, rfcaseprojectid integer not null, priority integer default 3 NOT NULL CHECK (priority IN (1,2,3,4,5)),
notes text, dtcreated integer, dtclosed integer, releaseversion text, releasenotes text, FOREIGN KEY (rfcaseprojectid) REFERENCES rfcaseproject(id))
CREATE TABLE purchase (id INTEGER PRIMARY KEY, customer_id integer not null, site_id integer not null, name text not null, vendorName text,
email text, productCode text, salesOrderNumber text, purchaseDate integer not null, expireDate integer, cancelDate integer, couponCode text,
notes text, renewNoticeSent boolean default 0 NOT NULL CHECK (renewNoticeSent IN (0,1)), quantity integer default 1 not null,
FOREIGN KEY (customer_id) REFERENCES customer(id) ON DELETE CASCADE, FOREIGN KEY (site_id) REFERENCES site(id) ON DELETE CASCADE )
CREATE TABLE trialrequest (id INTEGER PRIMARY KEY, dbid text not null, companyname text not null, contactname text not null, notes text,
email text not null, emailconfirmcode text not null, emailvalidated boolean default 0 NOT NULL CHECK (emailvalidated IN (0,1)), dtrequested integer,
dtprocessed integer, status integer default 0 not null, rejectreason text, key text, dtfetched integer, perpetual boolean default 0 NOT NULL CHECK (perpetual IN (0,1)))
CREATE TABLE license (id INTEGER PRIMARY KEY, dtcreated integer not null, customerid integer not null, regto text not null,
key text not null, code text not null, email text not null, fetchfrom text, dtfetched integer, fetched boolean default 0 NOT NULL CHECK (fetched IN (0,1)),
dbid text default 'v7_no_dbid' NOT NULL, siteid integer, dtLicenseExpiration integer, dtMaintenanceExpiration integer, perpetual boolean default 0 NOT NULL CHECK (perpetual IN (0,1)))
[KEY
{
"AyaNovaLicenseKey": {