From 77e0b4fec6d75fcf77188df27496fdd00b197207 Mon Sep 17 00:00:00 2001 From: "IceHe.xyz" Date: Mon, 18 Apr 2022 15:27:58 +0800 Subject: [PATCH] refactor(schemas): conform id length (#555) --- packages/schemas/tables/applications.sql | 2 +- packages/schemas/tables/passcodes.sql | 2 +- packages/schemas/tables/resources.sql | 2 +- packages/schemas/tables/settings.sql | 2 +- packages/schemas/tables/sign_in_experiences.sql | 2 +- packages/schemas/tables/users.sql | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/schemas/tables/applications.sql b/packages/schemas/tables/applications.sql index aea5742cd..e03613aa7 100644 --- a/packages/schemas/tables/applications.sql +++ b/packages/schemas/tables/applications.sql @@ -1,7 +1,7 @@ create type application_type as enum ('Native', 'SPA', 'Traditional'); create table applications ( - id varchar(128) not null, + id varchar(21) not null, name varchar(256) not null, description text, type application_type not null, diff --git a/packages/schemas/tables/passcodes.sql b/packages/schemas/tables/passcodes.sql index ba69a03d8..300f5fd98 100644 --- a/packages/schemas/tables/passcodes.sql +++ b/packages/schemas/tables/passcodes.sql @@ -1,7 +1,7 @@ create type passcode_type as enum ('SignIn', 'Register', 'ForgotPassword'); create table passcodes ( - id varchar(128) not null, + id varchar(21) not null, interaction_jti varchar(128) not null, phone varchar(32), email varchar(128), diff --git a/packages/schemas/tables/resources.sql b/packages/schemas/tables/resources.sql index 7a3661b20..04ed7985d 100644 --- a/packages/schemas/tables/resources.sql +++ b/packages/schemas/tables/resources.sql @@ -1,5 +1,5 @@ create table resources ( - id varchar(24) not null, + id varchar(21) not null, name text not null, indicator text not null unique, /* resource indicator also used as audience */ access_token_ttl bigint not null default(86400), /* expiration value in seconds, default is 24h */ diff --git a/packages/schemas/tables/settings.sql b/packages/schemas/tables/settings.sql index 86f78ae28..58612bb8b 100644 --- a/packages/schemas/tables/settings.sql +++ b/packages/schemas/tables/settings.sql @@ -1,5 +1,5 @@ create table settings ( - id varchar(128) not null, + id varchar(21) not null, custom_domain text, admin_console jsonb /* @use AdminConsoleConfig */ not null, primary key (id) diff --git a/packages/schemas/tables/sign_in_experiences.sql b/packages/schemas/tables/sign_in_experiences.sql index e7c25fac8..5bcdb8efc 100644 --- a/packages/schemas/tables/sign_in_experiences.sql +++ b/packages/schemas/tables/sign_in_experiences.sql @@ -1,5 +1,5 @@ create table sign_in_experiences ( - id varchar(128) not null, + id varchar(21) not null, branding jsonb /* @use Branding */ not null default '{}'::jsonb, language_info jsonb /* @use LanguageInfo */ not null default '{}'::jsonb, terms_of_use jsonb /* @use TermsOfUse */ not null default '{}'::jsonb, diff --git a/packages/schemas/tables/users.sql b/packages/schemas/tables/users.sql index 23600fc6e..63b9cd87d 100644 --- a/packages/schemas/tables/users.sql +++ b/packages/schemas/tables/users.sql @@ -1,7 +1,7 @@ create type users_password_encryption_method as enum ('SaltAndPepper'); create table users ( - id varchar(24) not null, + id varchar(12) not null, username varchar(128) unique, primary_email varchar(128) unique, primary_phone varchar(128) unique,