This commit is contained in:
2020-11-10 19:33:49 +00:00
parent 010aa16574
commit 3ef99ec59d
2 changed files with 2 additions and 5 deletions

View File

@@ -357,7 +357,7 @@ 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}");
@@ -521,9 +521,6 @@ namespace AyaNova.Biz
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "Roles");
}
//Optional employee number field must be less than 255 characters
if (!string.IsNullOrWhiteSpace(proposedObj.EmployeeNumber) && proposedObj.EmployeeNumber.Length > 255)
AddError(ApiErrorCode.VALIDATION_LENGTH_EXCEEDED, "EmployeeNumber", "255 max");
//Any form customizations to validate?
var FormCustomization = await ct.FormCustom.SingleOrDefaultAsync(z => z.FormKey == AyaType.User.ToString());

View File

@@ -329,7 +329,7 @@ $BODY$;
//Add user table
await ExecQueryAsync("CREATE TABLE auser (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, active bool not null, name text not null unique, " +
"lastlogin timestamp, login text not null unique, password text not null, salt text not null, roles integer not null, currentauthtoken text, " +
"dlkey text, dlkeyexpire timestamp, usertype integer not null, employeenumber varchar(255), notes text, customerid bigint, " +
"dlkey text, dlkeyexpire timestamp, usertype integer not null, employeenumber text, notes text, customerid bigint, " +
"headofficeid bigint, subvendorid bigint, wiki text, customfields text, tags varchar(255) ARRAY)");
//Index for name fetching