git-gurus-itu-devops / itu-minitwit

0 stars 0 forks source link

Set and get latest in db instead of file #59

Closed duckth closed 3 months ago

duckth commented 3 months ago

This PR will add a new table and model for handling the "Latest processed command" concept. Instead of a file, we will now save the command ID in a single-row table in the database. The model contains static methods for abstraction of the setting and getting. In the migration file, the current value is read from the text file and inserted as the base value. I am not a gigantic fan of inserting data in the migration, but @A-Guldborg has (almost) convinced me that this is basically just schema migration (from a "text table" to a postgres table) so ehh. It works.

duckth commented 3 months ago

Enig med Frederik I, at vi nok bør have en eller anden form for "error handling" eller hvad vi skal kalde det. Måske både på at gemme værdien og læse værdien, men I hvert faldt på minimum en af dem imo.

Se mit svar til frederik

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud