mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
refactor: update per review
This commit is contained in:
parent
224ae43050
commit
72caefaaf2
2 changed files with 4 additions and 2 deletions
|
@ -12,6 +12,6 @@ drop settings table and add systems table
|
|||
- core: removed `GET /settings` and `PATCH /settings` API
|
||||
- core: added `GET /configs/admin-console` and `PATCH /configs/admin-console` API
|
||||
- `/configs/*` APIs are config/key-specific now. they may have different logic per key
|
||||
- cli: removed `alterationState` and added `adminConsole` in valid `logto db config` keys, since:
|
||||
- cli: change valid `logto db config` keys by removing `alterationState` and adding `adminConsole` since:
|
||||
- OIDC configs and admin console configs are tenant-level configs (the concept of "tenant" can be ignored until we officially announce it)
|
||||
- alteration state is still a system-wide config
|
||||
|
|
|
@ -19,10 +19,12 @@ const doesTableExist = async (pool: CommonQueryMethods, table: string) => {
|
|||
export const doesSystemsTableExist = async (pool: CommonQueryMethods) =>
|
||||
doesTableExist(pool, Systems.table);
|
||||
|
||||
const legacyLogtoConfigsTable = '_logto_configs';
|
||||
|
||||
const getAlterationStateTable = async (pool: CommonQueryMethods) =>
|
||||
(await doesSystemsTableExist(pool))
|
||||
? sql.identifier([Systems.table])
|
||||
: sql.identifier(['_logto_configs']); // Fall back to the old config table
|
||||
: sql.identifier([legacyLogtoConfigsTable]); // Fall back to the old config table
|
||||
|
||||
export const getCurrentDatabaseAlterationTimestamp = async (pool: CommonQueryMethods) => {
|
||||
const table = await getAlterationStateTable(pool);
|
||||
|
|
Loading…
Add table
Reference in a new issue