@tomei/sso
TypeScript icon, indicating that this package has built-in type declarations

0.20.2 • Public • Published

SSO Package

How to use

  • run npm i
  • Make sure you set the environment in .sampledotenv in your project .env file
  • run npm run start:dev

How create a new migration

  • Make sure you have DATABASE_URL and SHADOW_DATABASE_URL in your project .env file
  • create a new empty database. dont do migration on it and set the SHADOW_DATABASE_URL to it
  • Create a database user
  • Grant the above user privileges to alter sso tables and shadow database. The user should have access to the sso table and shadow database only. Use create-sso-user.sql as an example to create the user and grant privileges
  • Make changes to the schema.prisma file
  • Run npx prisma migrate dev --name <migration-name> --preview-feature --create-only to create the migration. The migration will be created in the migrations folder.
  • open the newly created migration. review the migration and make changes if necessary.

notes:

  • if you create a new table, after migration has been created, change the default character set to latin1 from utf8mb4 and remove COLLATE phrase.please also add it to the create-sso-user.sql file for references

How to run migration

  • run npx prisma migrate deploy to run the migration
  • run npx prisma generate to generate the prisma client

Readme

Keywords

Package Sidebar

Install

npm i @tomei/sso

Weekly Downloads

208

Version

0.20.2

License

ISC

Unpacked Size

904 kB

Total Files

551

Last publish

Collaborators

  • it-assets