Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production Release #1356

Merged
merged 72 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
c10c72a
hotfix: escape if wikidata properties doesn't exist
thesocialdev Jan 27, 2024
3ad528a
Upgraded React and MUI Packages
caneppelevitor Aug 7, 2024
bc6da1e
Refactored outdated mui x-data-grid code
caneppelevitor Aug 7, 2024
4036523
Added missing updates on resolutions
caneppelevitor Aug 7, 2024
308b300
Fixed docker image build
caneppelevitor Aug 7, 2024
2ad7fad
Downgraded @types/react-dom to align with existing version
caneppelevitor Aug 7, 2024
f04ec80
Refactored VerificationRequest Page By Tranforming Into a Data Grid View
caneppelevitor Aug 7, 2024
0654a3e
Suppress hydration warning for current time display
caneppelevitor Aug 7, 2024
1c899ff
Merge branch 'stage' of https://github.com/AletheiaFact/aletheia into…
caneppelevitor Aug 7, 2024
b62b423
Removed duplicated source field on verificationRequest schema
caneppelevitor Aug 7, 2024
1c32cf8
Upgraded ant-design/icons to support react 18.3.1
caneppelevitor Aug 9, 2024
c0d79e6
Fixed TypeError of undefined on getAnnotations by checking if the sta…
caneppelevitor Aug 9, 2024
23e6cdc
Refactored way to verify the existence of the plugin
caneppelevitor Aug 9, 2024
e54eed1
Fixed error with annotations by ensuring the annotations plugin is lo…
caneppelevitor Aug 9, 2024
70d901b
Created PaginatedDataGrid component to avoid duplication warnings
caneppelevitor Aug 9, 2024
5007e37
Removed unused code
caneppelevitor Aug 10, 2024
beebe06
Simplified copilot prompt by instead asking the AI to analyze the cla…
pepermao Aug 10, 2024
d6f11df
Improved copilot error logging
pepermao Aug 10, 2024
5fc40ef
Updraged Remirror packages and fixed breking points on imports
caneppelevitor Aug 10, 2024
e9af628
fixed code smells
caneppelevitor Aug 12, 2024
6d849f2
Created Verification Request Create Form
caneppelevitor Aug 12, 2024
74e5fa1
Merge branch 'stage' of https://github.com/AletheiaFact/aletheia into…
caneppelevitor Aug 12, 2024
6256f0a
Properly handle agencia's backend api errors
pepermao Aug 12, 2024
9c47a48
Generated access token to communicate with the agencia's server using…
pepermao Aug 12, 2024
6e32f91
Fix cypress racing condition when adding a question to the fact-check…
thesocialdev Aug 13, 2024
ba6ab6e
Bump time to test CI racing condition
thesocialdev Aug 14, 2024
49060b5
Created agencia access_token to authenticate the agencia's API
pepermao Aug 14, 2024
f72c031
Fixed yarn build
pepermao Aug 14, 2024
84febfd
Merge pull request #1333 from AletheiaFact/upgraded-react-and-mui-pac…
thesocialdev Aug 14, 2024
a892801
Created Seo texts and renamed form
caneppelevitor Aug 14, 2024
b800e4a
Merge branch 'stage' of https://github.com/AletheiaFact/aletheia into…
caneppelevitor Aug 14, 2024
5bace55
Creted AffixButton for create verificationRequest
caneppelevitor Aug 15, 2024
06708b1
Fixed duplication error by creating a BaseForm component and useFormM…
caneppelevitor Aug 15, 2024
9852f04
provisional workAroud for date format incompatibilities
caneppelevitor Aug 15, 2024
822c6c6
Changed files structure and created extra text for no mandatory form …
caneppelevitor Aug 15, 2024
66b6915
Added missing property id on baseForm and Improved verifification req…
caneppelevitor Aug 15, 2024
7b4be87
Restored missign data-cy
caneppelevitor Aug 15, 2024
f47a603
Upgraded React and MUI Packages
caneppelevitor Aug 7, 2024
da9f8d0
Refactored outdated mui x-data-grid code
caneppelevitor Aug 7, 2024
28501ea
Added missing updates on resolutions
caneppelevitor Aug 7, 2024
64e72fe
Fixed docker image build
caneppelevitor Aug 7, 2024
f6fc8bd
Downgraded @types/react-dom to align with existing version
caneppelevitor Aug 7, 2024
93735a3
Suppress hydration warning for current time display
caneppelevitor Aug 7, 2024
1888bba
Upgraded ant-design/icons to support react 18.3.1
caneppelevitor Aug 9, 2024
7cbf926
Fixed TypeError of undefined on getAnnotations by checking if the sta…
caneppelevitor Aug 9, 2024
4cb4bdd
Refactored way to verify the existence of the plugin
caneppelevitor Aug 9, 2024
ca21369
Fixed error with annotations by ensuring the annotations plugin is lo…
caneppelevitor Aug 9, 2024
71b8b29
Created PaginatedDataGrid component to avoid duplication warnings
caneppelevitor Aug 9, 2024
fdd62ee
Removed unused code
caneppelevitor Aug 10, 2024
529efd6
Updraged Remirror packages and fixed breking points on imports
caneppelevitor Aug 10, 2024
69ef022
Fix cypress racing condition when adding a question to the fact-check…
thesocialdev Aug 13, 2024
ba8fcb7
Bump time to test CI racing condition
thesocialdev Aug 14, 2024
cd15d90
fixed: Inserted return statements in the migrations to fix the error …
Keikonichi Aug 9, 2024
0003bd8
Delete the comment that was unnecessarily inserted.
Keikonichi Aug 15, 2024
5486627
Refactored Verification Request Form to use Dynamic Form and restored…
caneppelevitor Aug 15, 2024
cb7385e
Merge branch 'stage' of https://github.com/AletheiaFact/aletheia into…
caneppelevitor Aug 15, 2024
c909984
New email input on dynamic input
caneppelevitor Aug 15, 2024
a769997
Merge pull request #1345 from AletheiaFact/copilot-improvements
thesocialdev Aug 15, 2024
df04889
Created SharedFormFooter to fix duplication error
caneppelevitor Aug 15, 2024
acb7bc1
Removed data_hash from dto
caneppelevitor Aug 15, 2024
1b4277e
Styled data grid and Altered json texts
caneppelevitor Aug 15, 2024
8649189
Removed unused imports
caneppelevitor Aug 15, 2024
34ea731
Applied PaginatedDataGrid component on verificationRequestList
caneppelevitor Aug 15, 2024
058a871
Properly passign data_hash to redirect
caneppelevitor Aug 16, 2024
a8b5877
Merge branch 'stage' of github.com:AletheiaFact/aletheia into stage
Keikonichi Aug 16, 2024
018bd20
Remove forgotten code from verification request schema
caneppelevitor Aug 17, 2024
1d09fa5
Applied Verification Requests's Query Pagination
caneppelevitor Aug 17, 2024
85b866f
Merge pull request #1334 from AletheiaFact/verification-request-data-…
thesocialdev Aug 19, 2024
6d5239e
Merge pull request #1125 from AletheiaFact/hotfix-wikidata-property
thesocialdev Aug 19, 2024
3334a0f
Merge branch 'stage' of github.com:AletheiaFact/aletheia into stage
Keikonichi Aug 20, 2024
31b8f97
Provisory workAroud to format publication date
caneppelevitor Aug 20, 2024
dca145d
Merge pull request #1357 from AletheiaFact/work-aroud-formatPublicati…
thesocialdev Aug 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ env:
OPENAI_API_KEY: ${{ secrets.DEVELOPMENT_OPENAI_API_KEY }}
ZENVIA_API_URL: ${{ secrets.DEVELOPMENT_ZENVIA_API_URL }}
ZENVIA_API_TOKEN: ${{ secrets.DEVELOPMENT_ZENVIA_API_URL }}
AGENCIA_ACCESS_TOKEN: ${{ secrets.DEVELOPMENT_AGENCIA_ACCESS_TOKEN }}

jobs:
setup-build-publish:
Expand Down Expand Up @@ -76,6 +77,7 @@ jobs:
echo "OPENAI_API_KEY=${{ secrets.PRODUCTION_OPENAI_API_KEY }}" >> $GITHUB_ENV
echo "ZENVIA_API_URL=${{ secrets.PRODUCTION_ZENVIA_API_URL }}" >> $GITHUB_ENV
echo "ZENVIA_API_TOKEN=${{ secrets.PRODUCTION_ZENVIA_API_TOKEN }}" >> $GITHUB_ENV
echo "AGENCIA_ACCESS_TOKEN=${{ secrets.PRODUCTION_AGENCIA_ACCESS_TOKEN }}" >> $GITHUB_ENV

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down Expand Up @@ -110,6 +112,7 @@ jobs:
sed -i "s%NOVU_APPLICATION_IDENTIFIER%$NOVU_APPLICATION_IDENTIFIER%g" config.$ENVIRONMENT.yaml
sed -i "s%AGENTS_API_URL%$AGENTS_API_URL%g" config.$ENVIRONMENT.yaml
sed -i "s%OPENAI_API_KEY%$OPENAI_API_KEY%g" config.$ENVIRONMENT.yaml
sed -i "s%AGENCIA_ACCESS_TOKEN%$AGENCIA_ACCESS_TOKEN%g" config.$ENVIRONMENT.yaml

- name: Set migrate-mongo-config.ts
run: |
Expand Down Expand Up @@ -184,6 +187,7 @@ jobs:
echo "OPENAI_API_KEY=${{ secrets.PRODUCTION_OPENAI_API_KEY }}" >> $GITHUB_ENV
echo "ZENVIA_API_URL=${{ secrets.PRODUCTION_ZENVIA_API_URL }}" >> $GITHUB_ENV
echo "ZENVIA_API_TOKEN=${{ secrets.PRODUCTION_ZENVIA_API_TOKEN }}" >> $GITHUB_ENV
echo "AGENCIA_ACCESS_TOKEN=${{ secrets.PRODUCTION_AGENCIA_ACCESS_TOKEN }}" >> $GITHUB_ENV

- name: Set environment
run: |
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions config.development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ services:
zenvia:
api_url: ZENVIA_API_URL
api_token: ZENVIA_API_TOKEN
agencia:
access_token: AGENCIA_ACCESS_TOKEN

3 changes: 2 additions & 1 deletion config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ services:
zenvia:
api_url: ZENVIA_API_URL
api_token: ZENVIA_API_TOKEN

agencia:
access_token: AGENCIA_ACCESS_TOKEN
2 changes: 2 additions & 0 deletions config.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ services:
zenvia:
api_url: ZENVIA_API_URL
api_token: ZENVIA_API_TOKEN
agencia:
access_token: AGENCIA_ACCESS_TOKEN
2 changes: 2 additions & 0 deletions config.test.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ services:
zenvia:
api_url: {env(ZENVIA_API_URL)}
api_token: {env(ZENVIA_API_TOKEN)}
agencia:
access_token: {env(AGENCIA_ACCESS_TOKEN)}
2 changes: 2 additions & 0 deletions cypress/e2e/tests/review.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@ describe("Test claim review", () => {
});
});
goToClaimReviewPage();
cy.wait(6000);
cy.get(locators.claimReview.INPUT_CLASSIFICATION)
.should("exist")
.click();
cy.get(`[data-cy=${review.classification}]`)
.should("be.visible")
.click();
cy.get(locators.claimReview.BTN_ADD_QUESTION).should("exist").click();
cy.wait(4000);
cy.get(locators.claimReview.INPUT_QUESTION)
.eq(1)
.type(review.question2);
Expand Down
2 changes: 2 additions & 0 deletions migrations/20221021135714-missingInformationMigration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Db } from "mongodb";
export async function up(db: Db, client) {
return;
// migrations not needed
const claimreviewsCursor = await db.collection("claimreviews").find();
while (await claimreviewsCursor.hasNext()) {
const doc = await claimreviewsCursor.next();
Expand Down
2 changes: 2 additions & 0 deletions migrations/20221201183431-claimreview-renameSentenceHash.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("claimreviews")
.updateMany({}, { $rename: { sentence_hash: "data_hash" } });
Expand Down
2 changes: 2 additions & 0 deletions migrations/20221202175619-report-renameSentenceHash.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("reports")
.updateMany({}, { $rename: { sentence_hash: "data_hash" } });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const sentenceHashIndexPresent = await db
.collection("claimreviewtasks")
.indexExists("sentence_hash_1");
Expand Down
2 changes: 2 additions & 0 deletions migrations/20230123213345-claim-personalitiesArray.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
/* if there was no personality field, create an empty array
if there was a personality field, but it was not an array, make it an array
if there was a personality field, and it was an array, rename it to personalities */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
/* if there was no personality field, create an empty array
if there was a personality field, but it was not an array, make it an array
if there was a personality field, and it was an array, rename it to personalities */
Expand Down
2 changes: 2 additions & 0 deletions migrations/20230131211511-claimCollectionToDebate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Db } from "mongodb";
const ObjectId = require("mongodb").ObjectID;

export async function up(db: Db) {
return;
// migrations not needed
try {
const claimCollectionCursor = await db
.collection("claimcollections")
Expand Down
42 changes: 20 additions & 22 deletions migrations/20230425092159-fix_debate_transition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Db } from "mongodb";
const ObjectId = require("mongodb").ObjectID;

export async function up(db: Db) {
return;
// migrations not needed
try {
await db.collection("logs").insertOne({
message: `start migration-up`,
Expand Down Expand Up @@ -81,17 +83,15 @@ export async function up(db: Db) {
{ $set: { isDeleted: true } }
);
// We will lose the old claimId in the claimreviews collection, but we can't do anything about that, the down function won't work either
await db
.collection("claimreviews")
.updateMany(
{ claim: ObjectId(claimId) },
{
$set: {
claim: claimRevision.claimId,
isDeleted: true,
},
}
);
await db.collection("claimreviews").updateMany(
{ claim: ObjectId(claimId) },
{
$set: {
claim: claimRevision.claimId,
isDeleted: true,
},
}
);
});
}
}
Expand Down Expand Up @@ -155,17 +155,15 @@ export async function down(db: Db) {
{ _id: ObjectId(claimId) },
{ $set: { isDeleted: false } }
);
await db
.collection("claimreviews")
.updateMany(
{ claim: ObjectId(claimId) },
{
$set: {
claim: claimRevision.claimId,
isDeleted: false,
},
}
);
await db.collection("claimreviews").updateMany(
{ claim: ObjectId(claimId) },
{
$set: {
claim: claimRevision.claimId,
isDeleted: false,
},
}
);
});
}
}
Expand Down
2 changes: 2 additions & 0 deletions migrations/20230818151239-fix_production_collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Db } from "mongodb";
const ObjectId = require("mongodb").ObjectID;

export async function up(db: Db) {
return;
// migrations not needed
try {
await db.collection("logs").insertOne({
message: `start migration-up`,
Expand Down
2 changes: 2 additions & 0 deletions migrations/20230818162852-fix_reviews_deleted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Db } from "mongodb";
import { Types } from "mongoose";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("claimreviews")
.updateMany(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("personalities")
.updateMany({}, { $set: { isHidden: false } });
Expand Down
2 changes: 2 additions & 0 deletions migrations/20230910134325-missingIsHiddenClaimProperty.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db.collection("claims").updateMany({}, { $set: { isHidden: false } });
}
2 changes: 2 additions & 0 deletions migrations/20230913185156-adding-totp-field.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db.collection("users").updateMany({}, { $set: { totp: false } });
}
export async function down(db: Db, client) {}
2 changes: 2 additions & 0 deletions migrations/20230913192154-adding-state-field.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db.collection("users").updateMany({}, { $set: { state: "active" } });
}
export async function down(db: Db, client) {}
2 changes: 2 additions & 0 deletions migrations/20231001191440-create-novu-subscribers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Novu } from "@novu/node";
import config from "../migrate-mongo-config";

export async function up(db: Db) {
return;
// migrations not needed
/* Create novu subscribers */
const novuApiKey = await config.novu_api_key;
const novu = new Novu(novuApiKey);
Expand Down
2 changes: 2 additions & 0 deletions migrations/20231002145530-rename-source-field.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("sources")
.updateMany({}, { $rename: { link: "href" } });
Expand Down
2 changes: 2 additions & 0 deletions migrations/20231013183353-move-source-extra-properties.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const sourcesCursor = await db.collection("sources").find();

while (await sourcesCursor.hasNext()) {
Expand Down
2 changes: 2 additions & 0 deletions migrations/20231020152642-adding-name-space-property.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("claims")
.updateMany({}, { $set: { nameSpace: "main" } });
Expand Down
2 changes: 2 additions & 0 deletions migrations/20231021165513-update-user-role-schema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const usersCursor = await db.collection("users").find();

while (await usersCursor.hasNext()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("claimreviews")
.updateMany({}, { $set: { reportModel: "Fact-checking" } });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("reports")
.updateMany({}, { $set: { reportModel: "Fact-checking" } });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
await db
.collection("claimreviewtasks")
.updateMany({}, { $set: { reportModel: "Fact-checking" } });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const claimReviewsCursor = await db.collection("claimreviews").find();

while (await claimReviewsCursor.hasNext()) {
Expand Down
2 changes: 2 additions & 0 deletions migrations/20240610193252-add-claimreviewid-on-sentences.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const collection = db.collection("sentences");

const pipeline = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const collection = db.collection("sentences");

const pipeline = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const collection = db.collection("sentences");

const pipeline = [
Expand Down
2 changes: 2 additions & 0 deletions migrations/20240610202706-add-claimreviewid-on-debates.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const collection = db.collection("debates");

const pipeline = [
Expand Down
2 changes: 2 additions & 0 deletions migrations/20240610204108-add-claimreviewid-on-images.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const collection = db.collection("images");

const pipeline = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const collection = db.collection("paragraphs");

const pipeline = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Db } from "mongodb";

export async function up(db: Db) {
return;
// migrations not needed
const collection = db.collection("paragraphs");

const pipeline = [
Expand Down
Loading
Loading