mirror of
https://github.com/logto-io/logto.git
synced 2025-04-14 23:11:31 -05:00
fix(schemas): field name in sie db data type should be camel-case (#2178)
Co-authored-by: wangsijie <wangsijie@silverhand.io>
This commit is contained in:
parent
5823e063d1
commit
8bb82e981e
2 changed files with 4 additions and 3 deletions
packages
|
@ -1,6 +1,7 @@
|
|||
import 'module-alias/register';
|
||||
import { assertEnv } from '@silverhand/essentials';
|
||||
import { createPool } from 'slonik';
|
||||
import { createInterceptors } from 'slonik-interceptor-preset';
|
||||
|
||||
import { deployAlterations } from '@/alteration';
|
||||
import { configDotEnv } from '@/env-set/dot-env';
|
||||
|
@ -9,7 +10,7 @@ configDotEnv();
|
|||
|
||||
const deploy = async () => {
|
||||
const databaseUrl = assertEnv('DB_URL');
|
||||
const pool = await createPool(databaseUrl);
|
||||
const pool = await createPool(databaseUrl, { interceptors: createInterceptors() });
|
||||
await deployAlterations(pool);
|
||||
await pool.end();
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ enum SignInMethodKey {
|
|||
}
|
||||
|
||||
type SignInExperience = {
|
||||
sign_in_methods: {
|
||||
signInMethods: {
|
||||
[SignInMethodKey.Username]: SignInMethodState;
|
||||
[SignInMethodKey.Email]: SignInMethodState;
|
||||
[SignInMethodKey.Sms]: SignInMethodState;
|
||||
|
@ -104,7 +104,7 @@ const alteration: AlterationScript = {
|
|||
|
||||
/* eslint-disable @silverhand/fp/no-mutating-methods */
|
||||
if (data) {
|
||||
const { sign_in_methods: signInMethods } = data;
|
||||
const { signInMethods } = data;
|
||||
const methodKeys = Object.values(SignInMethodKey);
|
||||
const primaryMethod = methodKeys.find(
|
||||
(key) => signInMethods[key] === SignInMethodState.Primary
|
||||
|
|
Loading…
Add table
Reference in a new issue