nhost / hasura-backend-plus

🔑Auth and 📦Storage for Hasura. The quickest way to get Auth and Storage working for your next app based on Hasura.
https://nhost.github.io/hasura-backend-plus/
MIT License
1.17k stars 187 forks source link

Locale migration issues #579

Closed elitan closed 3 years ago

elitan commented 3 years ago

Use this instead:

ALTER TABLE auth.accounts
  ADD COLUMN locale TEXT DEFAULT 'en' NOT NULL;

ALTER TABLE auth.accounts
  ALTER COLUMN locale DROP DEFAULT;
  1. Set existing accounts' locale to en.
  2. Drop default value

Default value is set using EMAILS_DEFAULT_LOCALE: https://github.com/nhost/hasura-backend-plus/blob/b4bfaf77fe24f17ed52a7dc5d5d289a6b9eaa9a2/src/shared/config/application.ts#L65-L67