From 70512db9b2e58a1097315100ef9335c28c389aaa Mon Sep 17 00:00:00 2001 From: Patrik Zita Date: Sat, 13 Jan 2024 07:00:01 +0100 Subject: [PATCH] feat: change column in deals table --- sqlite.db | Bin 24576 -> 32768 bytes src/db/schema.ts | 2 +- src/graphql/schema/deals/deals.ts | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sqlite.db b/sqlite.db index f551be7b33fd76119a68fd309e062fbcf35705cf..ee61c7073f83d4377f9e36b2ac7e32160924cbf6 100644 GIT binary patch delta 593 zcmZ9JKX21O7{<>DPHbcQRR=4oD&XX$i5gW()4!wJSXG4UhR8+AfRIT}=p_^4P= z6FxxId;$btphej_bzw&^FaqBoQ^m-88I0)Zp5gi3z0ciyH@Zxnu0JU%s_cFLv7%8Jqx@r#6ICkYqqdB#rO zu(W^IYI|MZi+mb+yMa&d?5(EpD^|zK8vG$YCgbmCc|Bb33GM9-U?|4Eb9;XvEZ-Me~@QhU+`1h##6yw zvSHnD^-i~a;B|ZSvEQr8bm|>NhwTv0Kk&n-X4IzF_I~35zSMmP2t0!s{DQA=16S|? z&fy&-5KI^7Dx86#l0}EK;^fOmp7K7kh)NuX9LHjq;RIbJm5SEFUUph|za7wWur0wh zlyk5p!4{Mx&}GS{1e>;sz?p*$1RM4}>F1f=I)Zh(n1d$zrd`Mj*3hrnO70uz8`zf| l3aX54{Dvu|-(Yg#nU=(GOW+oM&Q~TK-Ovg}N0Gl_`~~`$Fmf*4cyE$5r^lY~N#G!YBXA_x#gEIXGKAKC!G~6o$shOFeoq5o0l$P}m#&ZfDTt zgU;h#m#3sse$R7LIZnA2N18wDZ$Ihu_xVnDpYJ{$@ZIOVUIiPp)DyAnp>!-%Hj}Tk zJe)42SK+BtolMKO*cQvF76)Q>|E}#s4?}~==~x`8*AuD5aP&qW=J}A`AI3yyapiBt zci@7#u*cvWZs7;qz-M?5??A%dqRbz`ap2kzMWyy8P9Rj)4obOckwK`e6%=#RB!f^{ zGjPbb4KfIoHNZd2QxP{5(rg;LOxR^ zflyTsZ*<|B!C&}|yZnNm@EyLvSGdMaE+Mf^FxoD$RU$Tv#D+smY+~Ia)=XlxV42{? F{{ZIxfL{Or diff --git a/src/db/schema.ts b/src/db/schema.ts index 8d73564..93b02e1 100644 --- a/src/db/schema.ts +++ b/src/db/schema.ts @@ -6,7 +6,7 @@ export const users = sqliteTable("users", { }); export const deals = sqliteTable("deal", { - id: text("id").primaryKey(), + id: integer("id", { mode: "number" }).primaryKey({ autoIncrement: true }), title: text("title"), description: text("description"), isActive: integer("isActive", { mode: "boolean" }), diff --git a/src/graphql/schema/deals/deals.ts b/src/graphql/schema/deals/deals.ts index 275ab2b..e8a3262 100644 --- a/src/graphql/schema/deals/deals.ts +++ b/src/graphql/schema/deals/deals.ts @@ -1,14 +1,14 @@ -import { ObjectType, Field, ID } from "type-graphql"; +import { ObjectType, Field } from "type-graphql"; @ObjectType({ description: "Deal Object" }) export class Deal { @Field() - id: string; + id: number; @Field() title: string; @Field() description: string; - @Field() + @Field({ nullable: true }) isActive: boolean; }