This commit is contained in:
2021-07-23 23:31:43 +00:00
parent b7e06c1b13
commit 2756b2578e
13 changed files with 7631 additions and 373 deletions

View File

@@ -361,8 +361,6 @@ namespace AyaNova.Util
await EraseTableAsync("aworkorderitem", conn);
await EraseTableAsync("aworkorderstate", conn);
await EraseTableAsync("aworkorder", conn);
await EraseTableAsync("aworkordertemplateitem", conn);
await EraseTableAsync("aworkordertemplate", conn);
//---
@@ -387,16 +385,31 @@ namespace AyaNova.Util
await EraseTableAsync("apartassembly", conn);
await EraseTableAsync("apartinventory", conn);
await EraseTableAsync("apart", conn);
//--- QUOTE
await EraseTableAsync("aquoteitemexpense", conn);
await EraseTableAsync("aquoteitemlabor", conn);
await EraseTableAsync("aquoteitemloan", conn);
await EraseTableAsync("aquoteitempart", conn);
await EraseTableAsync("aquoteitemscheduleduser", conn);
await EraseTableAsync("aquoteitemtask", conn);
await EraseTableAsync("aquoteitemtravel", conn);
await EraseTableAsync("aquoteitemunit", conn);
await EraseTableAsync("aquoteitemoutsideservice", conn);
await EraseTableAsync("aquoteitem", conn);
await EraseTableAsync("aquotestate", conn);
await EraseTableAsync("aquote", conn);
//---
await EraseTableAsync("apmitem", conn);
await EraseTableAsync("apm", conn);
await EraseTableAsync("apmtemplateitem", conn);
await EraseTableAsync("apmtemplate", conn);
await EraseTableAsync("aquoteitem", conn);
await EraseTableAsync("aquote", conn);
await EraseTableAsync("aquotetemplateitem", conn);
await EraseTableAsync("aquotetemplate", conn);
await EraseTableAsync("aunitmodel", conn);
await EraseTableAsync("avendor", conn);
@@ -433,12 +446,12 @@ namespace AyaNova.Util
//after cleanup
using (var cmd = new Npgsql.NpgsqlCommand())
{
{
cmd.Connection = conn;
cmd.CommandText = "delete from \"auseroptions\" where UserId <> 1;";
await cmd.ExecuteNonQueryAsync();
cmd.CommandText = "ALTER SEQUENCE auseroptions_id_seq RESTART WITH 2;";
await cmd.ExecuteNonQueryAsync();
await cmd.ExecuteNonQueryAsync();
cmd.CommandText = "delete from \"auser\" where id <> 1;";
await cmd.ExecuteNonQueryAsync();
cmd.CommandText = "ALTER SEQUENCE auser_id_seq RESTART WITH 2;";
@@ -460,8 +473,8 @@ namespace AyaNova.Util
cmd.CommandText = "ALTER SEQUENCE apm_serial_seq RESTART WITH 1;";
await cmd.ExecuteNonQueryAsync();
}