fix: remove userid unique constraint and fix user list query (#4632)

* fix: remove userid unique constraint and fix user list query

* fix: improve instances query

* improve user queries

Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
Livio Spring
2022-11-07 10:33:22 +01:00
committed by GitHub
parent b432cf4963
commit 41c043bcd9
11 changed files with 384 additions and 353 deletions

View File

@@ -511,6 +511,9 @@ func (c Column) isZero() bool {
}
func join(join, from Column) string {
if join.identifier() == join.table.InstanceIDIdentifier() {
return join.table.identifier() + " ON " + from.identifier() + " = " + join.identifier()
}
return join.table.identifier() + " ON " + from.identifier() + " = " + join.identifier() + " AND " + from.table.InstanceIDIdentifier() + " = " + join.table.InstanceIDIdentifier()
}