Conseil icon indicating copy to clipboard operation
Conseil copied to clipboard

Inconsistency between conseil.sql and database in the testing environment

Open molowny opened this issue 5 years ago • 1 comments

Conseil creates DB schema from Slick table definition in the testing environment. It leads to the inconsistency in tables definitions and prevents from views usage. e.g.

  • If we create NUMERIC field in conseil.sql, Slick will replace it with DECIMAL(21,2) in Table.schema
  • If we create a view in conseil.sql, Slick will replace it with a TABLE in View.schema

molowny avatar Jul 09 '20 08:07 molowny

Example of the problem: I had to set the difficulty to 16307.42 instead of 16307.42093852398 in DbFixtures only because Slick changed NUMERIC to DECIMAL(21,2)

https://github.com/Cryptonomic/Conseil/blob/master/conseil-common/src/test/scala/tech/cryptonomic/conseil/common/bitcoin/BitcoinFixtures.scala#L251

molowny avatar Jul 10 '20 08:07 molowny