codingteam / loglist

Reincarnation of the famous service
https://loglist.xyz/
MIT License
7 stars 4 forks source link

Problems initializing DB on a new instance #198

Closed ForNeVeR closed 6 years ago

ForNeVeR commented 7 years ago

@kosc complains about DB initialization process. He told me that his DB was somehow created without suggested_quote.token field, and that caused troubles in loglist.

I suspect that something's wrong with the latest Play we're using, so I'll investigate.

rexim commented 7 years ago

@kosc please provide detailed instructions for reproduction.

kosc commented 7 years ago

@rexim just deactivate pgcrypto extension. I think it's not a bug, because README.md told me that I need to install pgcrypto, and I ignored it.

ForNeVeR commented 7 years ago

Probably some of our migrations/evolutions are not transactional? That seems to be the case.

rexim commented 7 years ago

@ForNeVeR how transactionality affects kosc's ability to focus on documentation? Please proceed, I'm really curious. :)

ForNeVeR commented 7 years ago

@rexim here's my hypothesis:

  1. @kosc had problems installing pgcrypto on his database instance, so he ran evolutions without pgcrypto available.
  2. That evolution statement failed.
  3. But the whole evolution 6 wasn't rolled back or somehow marked as failed for some reason.
  4. The next evolution 7 was successfully applied.

That's the only event sequence I can imagine that could lead to table suggested_quote in the database, but without the token field. That's why I currently think that we (or the Play framework itself) lack transactionality in the evolution engine. Or maybe something's wrong with that evolution script or PostgreSQL, I don't currently know.

rexim commented 7 years ago

@ForNeVeR cool thanks! Now this issue has a pretty well defined scope.