ribice / twisk

Golang RPC starter kit with Twirp
https://www.ribice.ba/twisk/
MIT License
127 stars 4 forks source link

Provided database may have a duplicate key #3

Closed csajedi closed 5 years ago

csajedi commented 5 years ago

Hello,

I am interested in Twirp for a fairly conventional RPC system and this starter kit seems perfect. I want to use the provided Postgres server to get up and running quick, but after changing the db string where instructed I get this for the ouput of step 3:

➜ migration git:(master) ✗ go run main.go 2019/08/09 15:53:54 ERROR #23505 duplicate key value violates unique constraint "roles_pkey" (addr="52.18.106.191:5432") exit status 1

Is it possible to get this repaired upstream? I am not that familiar with Postgres and want to hit the ground running.

ribice commented 5 years ago

I assume your database already has the related column.

Try to truncate the table and test again. Most probably you already ran the migration script.