aboutsummaryrefslogtreecommitdiff
path: root/tests/model-package-metadata.scm
Commit message (Collapse)AuthorAge
* Start handling ids as numbers, rather than stringsChristopher Baines2019-09-05
| | | | | | | | | squee, returns all data as strings, and expects strings as inputs to queries. So, keeping the ids as strings was easy initially, but it means that you can't tell from the type whether it should be quoted, or not... Therefore, handle ids as strings, converting them to numbers when they're fetched from the database, and back to strings as part of the queries.
* Fix some duplicated values in tablesChristopher Baines2019-08-04
| | | | | | | | | | | | | The licenses table, along with the package_metadata table had duplicate values. This could happen as the unique constraints on those tables didn't properly account for the nullable fields. The duplicates in those tables also affected the license_sets, packages, package_derivations tables in a similar way. Finally, the guix_revision_package_derivations table was also affected. This commit adds a migration to fix the data, as well as the constraints. THe code to populate the licenses and package_metadata tables is also updated.
* Associate a name with database connectionsChristopher Baines2019-07-12
| | | | This helps when working out which connection to the database is doing what.
* Fix the package-metadata testsChristopher Baines2019-05-16
|
* Fix type issues with the location idsChristopher Baines2019-05-14
| | | | | | | | On one code path, they were handled as numbers, whereas elsewhere they were handled as strings. This led to the package-metadata code trying to insert duplicate entries. Instead, just handle them as strings everywhere.
* Store and display the location of packagesChristopher Baines2019-05-13
| | | | | | | Store the location a package can be found at, and display this on the package page. If available, link off to the git repository containing the package.
* Remove the sha1_hash from the package_metadata tableChristopher Baines2019-05-12
I'm thinking about adding more fields to this table, and the sha1_hash values will make this tricker. Therefore, remove the value, and adjust the existing code to cope. This commit also adds a new test which coveres some of the changed functionality.