Hello. Quick question: if I want to create a postg...
# orm-help
r
Hello. Quick question: if I want to create a postgres user with readonly rights, does it make sense to create it through the seed.ts or is it better to have let's say a psql call before I run my code?
r
@RemiO ๐Ÿ‘‹ I would suggest adding it to the migrations file if thatโ€™s possible so that the
user
is created with the specific rights every time you need to run this on a new database wherever required. If this is just a one-time operation, then a
psql
call should be fine ๐Ÿ™‚
๐Ÿ‘ 1
r
Thanks, I will do that
Only issue I see is that I would have to put usernames and passwords in the migrations file. I can't read environment variables in the migration can I? It is possible with the seed.
r
Yeah if you need to read env variables, then best use the seed file.