Skip to content

Commit

Permalink
Merge pull request #53 from ChakshuGautam/ingest-data
Browse files Browse the repository at this point in the history
  • Loading branch information
ChakshuGautam authored Mar 25, 2023
2 parents cb1ee2c + cc24b97 commit 483ac96
Show file tree
Hide file tree
Showing 12 changed files with 314 additions and 223 deletions.
2 changes: 2 additions & 0 deletions impl/c-qube/prisma/migrations/20230325060252_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "spec"."DatasetGrammar" ADD COLUMN "isCompound" BOOLEAN NOT NULL DEFAULT false;
2 changes: 2 additions & 0 deletions impl/c-qube/prisma/migrations/20230325073303_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "spec"."DatasetGrammar" ADD COLUMN "eventGrammarFile" TEXT;
5 changes: 5 additions & 0 deletions impl/c-qube/prisma/migrations/20230325080819_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "spec"."DatasetGrammar" ADD COLUMN "eventGrammarId" INTEGER;

-- AddForeignKey
ALTER TABLE "spec"."DatasetGrammar" ADD CONSTRAINT "DatasetGrammar_eventGrammarId_fkey" FOREIGN KEY ("eventGrammarId") REFERENCES "spec"."EventGrammar"("id") ON DELETE SET NULL ON UPDATE CASCADE;
2 changes: 2 additions & 0 deletions impl/c-qube/prisma/migrations/20230325092839_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "spec"."EventGrammar" ADD COLUMN "file" TEXT;
42 changes: 24 additions & 18 deletions impl/c-qube/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,43 @@ model DimensionGrammar {
}

model DatasetGrammar {
id Int @id @default(autoincrement())
name String @unique
description String?
dimensions Json
timeDimension Json?
schema Json
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
deletedAt DateTime?
Pipe Pipe[]
program String?
id Int @id @default(autoincrement())
name String @unique
description String?
dimensions Json
timeDimension Json?
schema Json
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
deletedAt DateTime?
Pipe Pipe[]
program String?
isCompound Boolean @default(false)
eventGrammarFile String?
eventGrammar EventGrammar? @relation(fields: [eventGrammarId], references: [id])
eventGrammarId Int?
@@schema("spec")
}

model EventGrammar {
id Int @id @default(autoincrement())
name String @unique
instrument InstrumentType @relation(fields: [instrumentType], references: [type])
id Int @id @default(autoincrement())
name String @unique
instrument InstrumentType @relation(fields: [instrumentType], references: [type])
schema Json
dimensionMapping Json
instrumentField String
isActive Boolean @default(true)
isActive Boolean @default(true)
description String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
deletedAt DateTime?
instrumentType String
Pipe Pipe[]
program String?
eventType EventType @default(INTERNAL)
file String?
eventType EventType @default(INTERNAL)
DatasetGrammar DatasetGrammar[]
@@schema("spec")
}
Expand Down
Loading

0 comments on commit 483ac96

Please sign in to comment.