@tomei/sso
v0.52.2
Published
Tomei SSO Package
Downloads
1,033
Readme
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
andSHADOW_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 themigrations
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
fromutf8mb4
and remove COLLATE phrase.please also add it to thecreate-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