Skip to content

Commit

Permalink
Index price and avergae price
Browse files Browse the repository at this point in the history
  • Loading branch information
sameh-farouk committed May 20, 2024
1 parent 064e0cc commit 63020f6
Show file tree
Hide file tree
Showing 7 changed files with 697 additions and 36 deletions.
13 changes: 13 additions & 0 deletions db/migrations/1716214689738-Data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = class Data1716214689738 {
name = 'Data1716214689738'

async up(db) {
await db.query(`CREATE TABLE "price_stored" ("id" character varying NOT NULL, "new_price" numeric NOT NULL, "block" integer NOT NULL, "timestamp" numeric NOT NULL, CONSTRAINT "PK_3d68b3171d32422894302e2a84a" PRIMARY KEY ("id"))`)
await db.query(`CREATE TABLE "average_price_stored" ("id" character varying NOT NULL, "new_average_price" numeric NOT NULL, "block" integer NOT NULL, "timestamp" numeric NOT NULL, CONSTRAINT "PK_aea4f921e532918be63485242ab" PRIMARY KEY ("id"))`)
}

async down(db) {
await db.query(`DROP TABLE "price_stored"`)
await db.query(`DROP TABLE "average_price_stored"`)
}
}
Loading

0 comments on commit 63020f6

Please sign in to comment.