@tomei/sso
v0.66.0
Published
Tomei SSO Package
Readme
SSO Package
How to use
- run
npm i - Make sure you set the environment in .sampledotenv in your project
.envfile - run
npm run start:dev
How create a new migration
- Make sure you have
DATABASE_URLandSHADOW_DATABASE_URLin your project.envfile - create a new empty database. dont do migration on it and set the
SHADOW_DATABASE_URLto 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.sqlas an example to create the user and grant privileges - Make changes to the
schema.prismafile - Run
npx prisma migrate dev --name <migration-name> --preview-feature --create-onlyto create the migration. The migration will be created in themigrationsfolder. - 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
latin1fromutf8mb4and remove COLLATE phrase.please also add it to thecreate-sso-user.sqlfile for references
How to run migration
- run
npx prisma migrate deployto run the migration - run
npx prisma generateto generate the prisma client
