feat: update language leaderboard calculation

This commit is contained in:
2024-08-09 21:45:14 +07:00
parent a5cd6383f3
commit 0142224f60
19 changed files with 330 additions and 59 deletions
+60 -8
View File
@@ -1,9 +1,68 @@
{
"version": "6",
"dialect": "sqlite",
"id": "13d859a6-4c32-46a6-90e9-19740b2bb13a",
"id": "a268ec23-239a-4d86-8830-2f3c1c2110df",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"repository_languages": {
"name": "repository_languages",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"repo_id": {
"name": "repo_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"percentage": {
"name": "percentage",
"type": "real",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"repository_languages_name_idx": {
"name": "repository_languages_name_idx",
"columns": [
"name"
],
"isUnique": false
}
},
"foreignKeys": {
"repository_languages_repo_id_repositories_id_fk": {
"name": "repository_languages_repo_id_repositories_id_fk",
"tableFrom": "repository_languages",
"tableTo": "repositories",
"columnsFrom": [
"repo_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"repositories": {
"name": "repositories",
"columns": {
@@ -63,13 +122,6 @@
"notNull": true,
"autoincrement": false
},
"languages": {
"name": "languages",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"contributors": {
"name": "contributors",
"type": "text",
+2 -2
View File
@@ -5,8 +5,8 @@
{
"idx": 0,
"version": "6",
"when": 1723210265266,
"tag": "0000_young_emma_frost",
"when": 1723211354217,
"tag": "0000_tough_jubilee",
"breakpoints": true
}
]