This commit is contained in:
2020-06-23 18:20:51 +00:00
parent 854f1c153a
commit 12fbe66bd9
6 changed files with 20 additions and 20 deletions

View File

@@ -173,10 +173,10 @@ namespace AyaNova.Util
using (var cm = ct.Database.GetDbConnection().CreateCommand())
{
await ct.Database.OpenConnectionAsync();
cm.CommandText = "CREATE TABLE aschemaversion (schema INTEGER NOT NULL, id uuid not null);";
cm.CommandText = "CREATE TABLE aschemaversion (schema INTEGER NOT NULL, id text not null);";
await cm.ExecuteNonQueryAsync();
cm.CommandText = $"insert into aschemaversion (schema, id) values (1,'{Guid.NewGuid()}');";
cm.CommandText = $"insert into aschemaversion (schema, id) values (1,'{AyaNova.Util.Hasher.GenerateSalt()}');";
await cm.ExecuteNonQueryAsync();
await ct.Database.CloseConnectionAsync();
@@ -351,7 +351,7 @@ $BODY$;
LogUpdateMessage(log);
//Add user table
await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, dbid uuid, key text not null)");
await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, dbid text, key text not null)");
await SetSchemaLevelAsync(++currentSchema);
}