ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Create a read-only user in our databases #1318

Closed ctm closed 7 months ago

ctm commented 7 months ago

Create a read-only user in our databases.

Currently, I use psql to poke around in our database when tracking down bugs and also to manually enter special tournaments whose parameters can't be set by the UI. When tracking down bugs, there's no need for me to write to the database, but since all the commands I enter are ones I've typed myself, it's pretty unlikely that I'll accidentally change something. However, I want to write a tool to replay messages (#1288) and initially wanted a read-only connection, and probably the best way to do that is to create a read-only user and then have the tool make sure that the user that it uses to connect is indeed read-only.

So, the first step is creating a read-only user and that's described in a useful stack overflow page. I can do this "now" and start using it manually and then it'll be ready when I get around to writing the replay tool.

ctm commented 7 months ago

Done. The role is readonly.